System.Web Namespace HttpRequest Class
Gets Information about the URL of the current request.
[ VB ]
Public ReadOnly Property Url As Uri
[ C# ]
public Uri Url {get;}
[ C++ ]
public: __property Uri* get_Url ( );
[ JScript ]
public function get Url ( ) : Uri;
A Uri object containing information regarding the URL of the current request.
The following example renders a list of the properties of the current URL.
<table width=50% cellspacing=1 class="data" >
<tr>
<th colspan=2>Current URL Properties</th></tr>
<tr>
<td>AbsolutePath</td>
<td><%= Request.Url.AbsolutePath %></td></tr>
<tr>
<td>AbsoluteUri</td>
<td><%= Request.Url.AbsoluteUri %></td></tr>
<tr>
<td>Authority</td>
<td><%= Request.Url.Authority %></td></tr>
<tr>
<td>LocalPath</td>
<td><%= Request.Url.LocalPath %></td></tr>
<tr>
<td>Port</td>
<td><%= Request.Url.Port %></td></tr>
<tr>
<td>Scheme</td>
<td><%= Request.Url.Scheme %></td></tr>
<tr>
<td>UserInfo</td>
<td><%= Request.Url.UserInfo %></td></tr>
</table>
Show me
HttpRequest Members