URL ing of ASP. NET 2.0

Source: Internet
Author: User
URL ing Yes ASP. net2.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:

The following is a reference clip:
<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, China's self-learning Programming Network, www.zxbc.cn, the concept is very simple! If URL ing is configured for the preceding scenario, the following elements are displayed in the config file:


The following is a reference clip:
<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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.