how to use url routing in asp.net?

Posted by Prabu_Spark under ASP.NET on 5/9/2013 | Points: 10 | Views : 2696 | Status : [Member] | Replies : 4
Hi sir,
I want to know how to use url routing concept in asp.net c#. I have three pages namely Default,home and productlist pages. In
the url of the browser i need to rename http://localhost/Shopping/Default.aspx to http://localhost/Shopping/Login
and http://localhost/Shopping/home.aspx to http://localhost/Shopping/Home and http://localhost/Shopping/productlist.aspx
to http://localhost/Shopping/Products. Kindly give me the solution for this problem.................

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Learningtorise on: 5/9/2013 [Member] Starter | Points: 25

Up
0
Down
I believe you are looking for Its URL - Rewriting...

http://www.codeproject.com/Articles/2538/URL-Rewriting-with-ASP-NET

http://hashtagakash.wordpress.com/

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Satyapriyanayak on: 5/9/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
ASP.NET routing enables you to use URLs that do not have to map to specific files in a Web site. Because the URL does not have to map to a file, you can use URLs that are descriptive of the user's action and therefore are more easily understood by users.

Please refer the below links

http://msdn.microsoft.com/en-us/library/cc668201.aspx

http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx

http://stackoverflow.com/questions/2341639/asp-net-system-web-routing-and-querystring-parameters

If this post helps you mark it as answer
Thanks

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Annaharris on: 5/9/2013 [Member] Starter | Points: 25

Up
0
Down
I had various issues while working on URL routing in Asp.Net. Thanks for sharing those links.

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheonarayan on: 5/11/2013 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Prabu,

There is a very well written article in this website related with ASP.NET routing that will help you achieving what you are looking for. Please visit http://www.dotnetfunda.com/articles/article870-a-walkthrough-to-aspnet-40-url-routing.aspx

Thanks


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response