HttpWebRequest.Referer Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the value of the Referer HTTP header.

Namespace:   System.Net
Assembly:  System (in System.dll)

member Referer : string with get, set

Property Value

Type: System.String

The value of the Referer HTTP header. The default value is null.

If the AllowAutoRedirect property is true, the Referer property is set automatically when the request is redirected to another site.

To clear the Referer HTTP header, set the Referer property to null.

System_CAPS_noteNote

The value for this property is stored in WebHeaderCollection. If WebHeaderCollection is set, the property value is lost.

The following code example sets the Referer property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: