Friday, August 31, 2012

routes for web forms!

http://msdn.microsoft.com/en-us/library/cc668202%28v=vs.90%29.aspx makes web forms routing look pretty easy:

void Application_Start(object sender, EventArgs e)
{
   RegisterRoutes(RouteTable.Routes);
}
   
public static void RegisterRoutes(RouteCollection routes)
{
   routes.Add("BikeSaleRoute", new Route
   (
      "bikes/sale",
      new CustomRouteHandler("~/Contoso/Products/Details.aspx")
   ));
}

No comments:

Post a Comment