We help IT Professionals succeed at work.
Get Started

Asp.Net 3.5 Url Rewriting Solution and C#

kruegerste
kruegerste asked
on
1,433 Views
Last Modified: 2012-05-10
Hello,

Can someone please instruct me and also provide an example of the best way to "rewrite" urls to more seo/customer friendly urls using ASP.NET 3.5?

I see the in ASP.NET 1.0 and 2.0 that most had to use url rewriting modules or custom rewrite methods to achieve this.  Now 3.5 has this System.Web.Routing assembly included in it.  Is this new assembly the best way to go or is there a superior 3rd party module from 1.1 or 2.0 that would work better, even with 3.5?

If the answer is use System.Web.Routing assembly, could someone provide an example of how to convert the following url (I have found many references on web but none address the parameters in querystring)?

convert
 "~/games/game.aspx?gameid=12345&seasonid=2009"
 to
"~/games/2009/12345

We are not sure how to convert the parameters to this format or retrieve the much needed values after the page renders.

Thanks.

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 2 Answers and 4 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE