what is the best way to convert aspx dynamic pages urls in user friendly urls using asp.net 2.0.
I want to convert http://www.mydomain.com/product.aspx?Id=4 in to **http://www.mydomain.com/product4.aspx
what is the best way to convert aspx dynamic pages urls in user friendly urls using asp.net 2.0.
I want to convert http://www.mydomain.com/product.aspx?Id=4 in to **http://www.mydomain.com/product4.aspx
By using an url rewriting method! Here's some information from ScottGu.
You need the following:
Thats it, you want to find a simple one where you just add the regexped-routes in your web.config. If you want to remove the .aspx you can do this by changing in IIS. There's some info on this on ScottGu's blogg aswell!
How about using ASP.NET MVC? You should be able to map that to a route pretty easily - either as "product{id}"
or "product/{id}"
. I personally would drop the .aspx
, but that is up to you.
i really like: http://www.urlrewriting.net/116/de/home.html
Thank you. I have been looking for something like this for my site: http://www.iAmAnArtist.com . This will def. help me out . Will post you my results once completed.
Jason H.