0

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.

Maen
  • 1,030
  • 7
  • 19
  • 33

3 Answers3

2

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.

Michael Stum
  • 177,530
  • 117
  • 400
  • 535
1

You can use routing in Webforms:

Using ASP.NET Routing Without ASP.NET MVC

Community
  • 1
  • 1
CD..
  • 72,281
  • 25
  • 154
  • 163
0

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.

Jon Galloway
  • 52,327
  • 25
  • 125
  • 193