Introduction URL Mapping is the new feature provided in ASP.NET 2.0. The URL mapping technique helps you to map a specified URL with another URL. To make you clearer, let's say you have a page called Homepage.aspx in your site to access home page and all your users are using that page to access home page of your site. But due to some reason you changed your home page to OriginalHome.aspx, then instead of informing them about the change, by using of URL Mapping technique you can map to new page.
This can be implemented in configuration section.
Syntax:
<urlMappings enabled="[true|false]"> <add url="String" mappedUrl="String"/> </urlMappings>
Some of the advantages:
1. If your client book marks to a page, and you had a situation of removing that page and adding other page in that place, then instead of letting your client know about the page change, by using of urlMappings you can solve your business case.
2. If you have a big and complicated URL, and you don't want to give that to user, then you can give a simple URL to the user and you can map the simple URL with the original URL using urlMappings.
3. Menu control handing can be easy by this. The best example for this is asp.net site.
4. Security also involved in this (Since user is not able to see the real page name on the URL. It's kind of encaptulation!)
|
| Author: Tony John 13 Mar 2007 | Member Level: Diamond Points : 0 |
We found the orginal artcle @ http://www.w3coder.com/alphatalks/v2urlmap.aspx
|