asp.net| Tutorial |url Mapping
URL mapping is the new feature provided in ASP.net 2.0. URL mapping technology helps us map a particular URL to another URL. To help understand, let's say you have a page called Homepage.aspx on the site to access the homepage, and all users will use this page to access your homepage. But for some reason, you should change the homepage to originalhome.aspx. Using URL mapping allows you to map to a new page without having to notify the user.
If we set the URL mapping, then any user in the URL bar input homepage.aspx, the call is originalhome.aspx.
Deep concept:
Let's see how to implement it.
This can be implemented in the configuration section.
Grammar:
The following are the referenced contents: Mappedurl= "String"/> |
If you want to use URL mapping, you must set the Enabled property to True. Each add element contains an original URL and a mapping URL.
The elements in the config file appear as follows:
The following are the referenced contents: |
Once we have modified or added elements as above in the Web.config file of the project, any user attempting to access Homepage.aspx will invoke the Originalhome.aspx page because of the URL mapping. Interestingly, the homepage.aspx is still displayed only in the URL bar. So despite the thought of internal call/execution originalhome.aspx, the user still sees hopepage.aspx in the URL bar.
Some advantages:
1. If your customer signs a link to a page, but you have to delete the page and change to another page, then use URL mapping you can solve this business problem without letting the customer know the page changes.
2. If there is a large and complex URL, but do not want to give it to the user, then you can tell the simple URL, and the simple URL itself to map to the original URL.
3. This method can be used to facilitate the processing of menu controls. The best example is the ASP.net site.
4. This also involves security (users cannot see the real page name in the URL bar, which is also an encryption!).
I hope you like this new feature.