Link to home
Create AccountLog in
.NET Programming

.NET Programming

--

Questions

--

Followers

Top Experts

Avatar of kruegerste
kruegerste🇺🇸

Asp.Net 3.5 Url Rewriting Solution and C#
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.

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of TheMozzTheMozz🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of TheMozzTheMozz🇺🇸


Avatar of kruegerstekruegerste🇺🇸

ASKER

Thanks for the quick reply.  But could you please answer the first and main part of our question?  I'm assuming I know your answer but want to make sure.  Are you saying that using the System.Web.Routing is the best solution as of today for asp.net 3.5 and url rewriting?  

If so, that first example is a good one and would probably do me well.

Thanks.

SOLUTION
Avatar of TheMozzTheMozz🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

.NET Programming

.NET Programming

--

Questions

--

Followers

Top Experts

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.