tags:

views:

335

answers:

4

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

+4  A: 

By using an url rewriting method! Here's some information from ScottGu.

You need the following:

  • Actionless Form
  • URL Rewriter Module for ASP.NET

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!

Filip Ekberg
A: 

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.

Marc Gravell
I'd vote for that too. But if he already have a complete system that is asp.net forms-based it'd be hell to rewrite all that for nice urls. Takes approx. 20 mins to implement an url rewriter. Takes weeks to re-code.
Filip Ekberg
ehh 20 minutes is a stretch if you have to rewrite your links throughout the entire application, including form actions
Shawn Simon
A: 

i really like: http://www.urlrewriting.net/116/de/home.html

Andreas Niedermair
I think that is the one i am using for webexpress.nu :)
Filip Ekberg
as you did not support any url, i was not shure if you mean this one :)
Andreas Niedermair
A: 

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.