Reputation: 1030
I have a small task to do, and figured it would be better to start here than doing it wrong then coming here again. I need to replace my URLs with a more friendly format as the following: Current: www.MySite.com/default.aspx?userID=XX I want it the users to type : www.MySite.com/user/(UserName)
Also, Current: www.MySite.com/default.aspx?userID=XX&ref#XX I want the users to type: www.MySite.com/user/(UserName)/ref#{refno}
Thanks in advance
PS: I do not want to use Asp.net MVC.
Upvotes: 0
Views: 951
Reputation: 74166
You can use routing in Webforms:
Using ASP.NET Routing Without ASP.NET MVC
Upvotes: 1
Reputation: 181004
You can use the MVC Routing Feature without using MVC, as it's a separate component built on top of ASP.net.
There is an article on 4GuysFromRolla about this.
Upvotes: 2
Reputation: 53145
If you can, I'd just use IIS7 URL Rewriting for that. Your mapping configuration can go in your web.config, and you wouldn't have to change your application at all.
Upvotes: 0