Use the URL mapping of ASP.NET 2.0
Objective: I will try to provide some information for URL mapping and its usage in ASP.NET 2.0.
Introduction:
The 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, we assume that you have a page called HomePage.aspx on the site to access the home page, all users have also used this page to access your homepage. But for some reason, you have to change the homepage to OriginalHome.aspx. Use the URL mapping at this time allows you to map to a new page without notifying the user. If we set up a URL mapping, then any user enters homepage.aspx in the URL bar, the call is ORIGINALHOME.ASPX.
In-depth concept:
Ok, I think you might like this concept like me. Let us see how to implement it.
This can be implemented in the Configuration section.
Syntax:
If you want to use a URL mapping, you must set the enabled property to True. Each add element contains an original URL and a mapping URL. Yes, the concept is simple! If we configure the URL mapping for the above scenario, the elements in the config file are shown below:
Once we have modified or increase the above elements in the web.config file, any user attempts to access HomePage.aspx, because the URL mapping will call the OriginalHome.aspx page. Interesting is that only HOMEPAGE.ASPX is still displayed in the URL column. So although it is thought that the internal call / executive ORIGINALHOME.ASPX, users still see HomePage.ASPX in the URL column.
After the concept is finished, let's take a look at it!
Some advantages:
1. If your client is marked to a page link, you have to delete the page and replace other pages, then use the URL mapping you can solve this business problem without letting customers know this page change. 2. If there is a big and complicated URL, but don't want to give it to the user, then you can inform the simple URL, and you will map your simple URL to the original URL. 3. Use this method to make it easy to handle the menu control. The best example is the ASP.NET site. 4. This is also involved here (users cannot see the real page name in the URL column, which is also an encryption!).
I hope you like this new feature.
Yes, I know, now your question is, since ASP.NET 2.0 is still not available, how to take advantage of this new feature. There is a workaround here. Stev explained a brief explanation in his blog. You can see it at http://weblogs.asp.net/ssmitH/archive/2003/11/06/36191.aspx. His explanation is very simple, according to your actual case, you can add functions for it. Now you can use this trick, and wait for the ASP.NET 2.0, you can use new features.