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