ASP.NET Whidbey Overview
page 9 of 14
by Steven Smith
Feedback
Average Rating: 
Views (Total / Last 10 Days): 59373/ 168

URL Mapping

Another common problem with ASP.NET sites today is long, ugly URLs (look at any MSDN article for example).  While URL mapping can certainly be done today using either Application_BeginRequest in the global.asax or a custom HttpHandler, ASP.NET 2.0 makes common mappings simple by adding support for them to the web.config file.  A new configuration section, urlMappings, will allow individual 'fake' URLs to be mapped to their actual (probably much longer) counterparts.  A very common use for this would be to eliminate navigation-specific querystring data, such as that used by the IBuySpy or Rainbow portal applications.  Instead of having users navigate to http://yourwebsite.com/Default.aspx?tabid=0 you can point them to http://yourwebsite.com/Home.aspx, and specify the mapping in the config like so:

<urlMappings enabled="true">
  <add url="~/Home.aspx" mappedUrl="~/Default.aspx?tabid=0" />
</urlMappings>

 


View Entire Article

User Comments

Title: very good article   
Name: raja raja
Date: 2009-12-04 7:57:23 AM
Comment:
very good and informative website.
Title: nice artical   
Name: abdulla hussein
Date: 2007-04-29 6:28:16 AM
Comment:
I like it , it is very informative . thanks alot man

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-12-09 12:14:36 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search