hello all
i want to rewrite url through java script .
for example my global asax look like
public static void RegisterRoutes(RouteCollection routeCollection)
{ routeCollection.MapPageRoute("search", "search/{Cat_Id}", "~/Default2.aspx");
}
i have cat id in java script when i call javascript it bind and it should be GetRouteUrl to redirect .
when i simple call page name then it is working
window.location.href = "product.aspx?search=" + i.item.label + i.item.category;
but when i used GetRouteUrl then its not working .help me anyone
window.location.href = '<%# Page.GetRouteUrl("search", new {Cat_Id = "Cat_Id"})%>'.replace('Cat_Id', i.item.value);