.NET Programming
--
Questions
--
Followers
Top Experts
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&seas onid=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.
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=
 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
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Here is a better article:
http://www.4guysfromrolla.com/articles/051309-1.aspx
http://www.4guysfromrolla.com/articles/051309-1.aspx
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.
If so, that first example is a good one and would probably do me well.
Thanks.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
.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.