string "") + context. Request.applicationpath;
The output of this sentence can be obtained by the address such as: http://localhost:25138/such a domain name is composed of two parts, where "/" This is by
Context. Request.applicationpath; the output is meant to get the virtual application root path of an ASP. NET application on the server.
The way to get the full path is:
Request.url // gets information about the URL of the current request. The // output is:http://localhostRequest.Url.AbsoluteUri is to get absolute path output and also http: //Request.Url.PathAndQuery getSystem.Uri.AbsolutePath separated by a question mark (?) and The System.Uri.Query property. The output is:
In addition, there is a method that is performed on the specified string comparison, that is, the StartsWith method, which determines whether the beginning of this string matches the specified string when compared using the specified comparison option.
There is also a method to compare to the end: EndsWith, which determines whether the end of this instance matches the specified string.
These two methods can be compared after ignoring the case, the approximate syntax of the two methods is the same as follows:
Url.startswith ("http//", StringComparison.OrdinalIgnoreCase)
This is the beginning of the URL to determine whether there is an HTTP header, and is ignoring the case of the premise
On how to get the website domain name