Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HttpRequest.RawUrl Property

Gets the raw URL of the current request.

[Visual Basic]
Public ReadOnly Property RawUrl As String
[C#]
public string RawUrl {get;}
[C++]
public: __property String* get_RawUrl();
[JScript]
public function get RawUrl() : String;

Property Value

The raw URL of the current request.

Remarks

The raw URL is defined as the part of the URL following the domain information. In the URL string http://www.contoso.com/articles/recent.aspx, the raw URL is/articles/recent.aspx. The raw URL includes the query string, if present.

Example

The following example assigns the raw URL string of the current request to a string variable.

[Visual Basic] 
Dim MyUrl As String
 MyUrl = Request.RawUrl
   

[C#] 
String MyUrl = Request.RawUrl;
   

[C++] 
String* MyUrl = Request->RawUrl;
   

[JScript] 
var myUrl : String = Request.RawUrl
   

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Show:
© 2015 Microsoft