User-698989805 posted
I've rewritten url for ASP.NET
application that works fine. But unfortunately, I am having an issue as follows:
Suppose, I've a link that uses id at the end to redirect to a specific product to edit. So when I click on the link, it redirects like this:
http://localhost:56317/AddProducts/123456
Now when I like to redirect to another link, say ProductDetails, then it becomes this:
http://localhost:56317/AddProducts/ProductDetails
For url rewriting, I've done this in the Global.asax
file:
routes.MapPageRoute("detailsProducts", "ProductDetails", "~/ProductDetails.aspx");
routes.MapPageRoute("addProducts", "AddProducts", "~/AddProducts.aspx");
routes.MapPageRoute("addProductsWithId", "AddProducts/{Code}", "~/AddProducts.aspx");
Anything I missed here? Initially it works fine, when I click on any of the links. It redirects perfectly. But when I click on any product with ids, it creates the extra name at the end and never redirects to another links with the contents expected.