Im using the GerRouteUrl class to update the existing URLs on my website. I have implemented this successfully on several pages but now im stuck. Im unable to include a DepartmentId and CategoryId as parameters in the GetRouteUrl method that takes the user
to Product.aspx page.
I have created the ProductRoute below.
public class UrlRoute
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("MainRoute", "Main", "~/default.aspx");
routes.MapPageRoute("DepartmentRoute", "Department/{Name}", "~/Catalog3.aspx");
routes.MapPageRoute("ProductRoute", "Products/{CatName}/", "~/Product.aspx");
}
}
The user selects a Department and then the website takes the user the a new page listing the Categories that match the DepartmentId. The URL would look like /Depa ...
Go to the complete details ...