System.Net.HttpWebRequest.Referer Property

Gets or sets the value of the Referer HTTP header.

Syntax

public string Referer { get; set; }

Value

A string containing the value of the HTTP Referer header. The default value is null.

Remarks

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

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

Note:

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

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0