void Application_Start(object sender, EventArgs e) { RegisterRoutes(RouteTable.Routes); } private void RegisterRoutes(RouteCollection routeCollection) { routeCollection.MapPageRoute("RouteForCustomer", "Customer/{Id}", "~/Customer.aspx"); }
protected void Page_Load(object sender, EventArgs e) { try { string id = Page.RouteData.Values["Id"].ToString(); Response.Write("<h1>Customer Details page</h1>"); Response.Write(string.Format("Displaying information for customer : {0}", id)); } } catch (Exception ex) { throw ex; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)