Introduction:
URL ing is a new feature in ASP. NET 2.0. The URL ing technology helps us map a specific URL to another URL. For better understanding, we assume that you have a page named homepage. aspx on the website to access the Home Page. All users also use this page to access your home page. For some reason, you need to change the home page to originalhome. aspx. Using URL ing allows you to map to a new page without notifying users.
If URL ing is set, originalhome. aspx is called when homepage. aspx is input in the URL bar.
Concept:
Let's see how to implement it.
This can be implemented in the configuration section.
Syntax:
<Urlmappings enabled = "[true | false]">
<Add url = "string"
Mappedurl = "string"/>
</Urlmappings>
If you want to use URL ing, you must set the enabled attribute to true. Each add element contains an original URL and a ing URL. Yes. The concept is very simple! If URL ing is configured for the preceding scenario, the following elements are displayed in the config file:
<Urlmappings enabled = "true">
<Add url = "~ /Homepage. aspx "mappedurl = "~ /Originalhome. aspx "/>
</Urlmappings>
Once we make changes or in the project's web. the above elements are added to the config file, and any user attempts to access the homepage. in aspx, originalhome is called because of URL ing. ASPX page. Interestingly, only homepage. aspx is displayed in the URL bar. So even if you think of calling/executing originalhome. aspx internally, you still see hopepage. aspx in the URL bar.
Some advantages:
1. if your customer tags a link to a page, but you have to delete the page and change it to another page, then, you can use URL ing to solve this business problem without letting the customer know the page changes.
2. If there is a large and complex URL, but you don't want to give it to the user, you can tell the simple URL and map the simple URL to the original URL.
3. You can use this method to conveniently process menu controls. The best example is the Asp.net site.
4. Security is also involved here (users cannot see the real page name in the URL bar, which is also an encryption !).
Hope you like this new feature.
Yes, I know. Now your problem is that, since ASP. NET 2.0 is not available yet, how can we use this new feature. Here is a work und. Stev gave a brief explanation in his blog.
See http://weblogs.asp.net/ssmith/archive/2003/11/06/36191.aspx. His explanation is very simple. Based on your actual case, you can add functions for it.