asp.net.ph

HttpCookie.Domain Property

System.Web Namespace   HttpCookie Class


Sets or retrieves the domain to associate the cookie with.

[ VB ]
Public Property Domain As String

[ C# ]
public string Domain {get; set;}

[ C++ ]
public: __property String* get_Domain ( );
public: __property void set_Domain ( String* );

[ JScript ]
public function get Domain ( ) : String;
public function set Domain ( String );

Property Value

The name of the domain to associate the cookie with. The default value is the current domain.

Remarks

Setting the Domain attribute limits transmission of the cookie to clients requesting a resource from that domain.

Example

The following example sets the cookie's domain.

[ VB ]
myCookie.Domain = "Microsoft.com"


[ C# ]
myCookie.Domain = "Microsoft.com";


[ JScript ] 
myCookie.Domain = "Microsoft.com"
See Also

HttpCookie Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph