HttpCookiesSection.Domain 属性
定义
获取或设置 Cookie 域名。Gets or sets the cookie domain name.
此 API 支持产品基础结构,不能在代码中直接使用。
public:
property System::String ^ Domain { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("domain", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public string Domain { get; set; }
[<System.Configuration.ConfigurationProperty("domain", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.Domain : string with get, set
Public Property Domain As String
属性值
Cookie 域名。The cookie domain name.
- 属性
示例
下面的代码示例说明如何使用 Domain 属性。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;
' Get the current Domain.
Dim domainValue As String = _
httpCookiesSection.Domain
' Set the Domain property.
httpCookiesSection.Domain = _
String.Empty