HttpContentHeaderCollection.ContentLocation Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the value of the HTTP Content-Location header on the HTTP content.
public:
property Uri ^ ContentLocation { Uri ^ get(); void set(Uri ^ value); };
Uri ContentLocation();
void ContentLocation(Uri value);
public System.Uri ContentLocation { get; set; }
var uri = httpContentHeaderCollection.contentLocation;
httpContentHeaderCollection.contentLocation = uri;
Public Property ContentLocation As Uri
Property Value
The value of the HTTP Content-Location header on the HTTP content. A null value means that the header is absent.
Remarks
The following sample code shows a method to get or set the Content-Location header value on HTTP content using the ContentLocation property on the HttpContentHeaderCollection object.
// Content-Location header
// Uri
void DemoContentLocation(IHttpContent content) {
var h = content.Headers;
h.ContentLocation = new Uri("http://example.com/");
var header = h.ContentLocation;
uiLog.Text += "\nCONTENT LOCATION HEADER\n";
uiLog.Text += string.Format("ContentLocation: ToString: {0}\n\n", header.ToString());
}