HttpCookiesSection.Domain Property

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Gets or sets the cookie domain name.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("domain", DefaultValue = "")]
public string Domain { get; set; }

Property Value

Type: System.String

The cookie domain name.

The following code example shows how to use the Domain property.


// Get the current Domain.
string domainValue = 
    httpCookiesSection.Domain;

// Set the Domain.
httpCookiesSection.Domain = 
    string.Empty;

.NET Framework
Available since 2.0
Return to top
Show: