How does ASP. NET obtain the URL address in the address bar?

Source: Internet
Author: User

How does ASP. NET obtain the URL address in the address bar? See the following implementation method:

First:

Http://www.bkjia.com/liehuonet/default.aspx

Request. ApplicationPath:/liehuonet
Request. CurrentExecutionFilePath:/liehuonet/default. aspx
Request. FilePath:/liehuonet/default. aspx
Request. Path:/liehuonet/default. aspx
Request. RawUrl:/liehuonet/default. aspx
Request. Url. AbsolutePath:/liehuonet/default. aspx
Request. Url. AbsoluteUri: http://www.bkjia.com/liehuonet/default.aspx
Request. Url. Host: www.bkjia.com
Request. Url. LocalPath:/liehuonet/default. aspx

Second:

RawUrl
The original URL of the current request.
Remarks

The original URL is defined as the part after the domain information in the URL. In the URL string http://www.bkjia.com/cn/introduct/lanmu_24_57.html, the original URL is/cn/introduct/lanmu_24_57.html. The original URL contains the query string (if any ).

The url for the test is http://www.bkjia.com/liehuonet/default.aspx? Id = 1. The result is as follows:

Request. ApplicationPath:/liehuonet

Request. CurrentExecutionFilePath:/liehuonet/default. aspx

Request. FilePath:/liehuonet/default. aspx

Request. Path:/liehuonet/default. aspx

Request. PathInfo:

Request. PhysicalApplicationPath: E: \ WWW \ liehuonet \

Request. PhysicalPath: E: \ WWW \ liehuonet \ default. aspx

Request. RawUrl:/liehuonet/default. aspx? Id = 1

Request. Url. AbsolutePath:/liehuonet/default. aspx

Request. Url. AbsoluteUri: http://www.bkjia.com/liehuonet/default.aspx? Id = 1

Request. Url. Host: www.bkjia.com

Request. Url. LocalPath:/liehuonet/default. aspx

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.