Ext.Net.Cookies.Set C# (CSharp) Method

Set() public static method

Create a cookie with the specified name and value. Additional settings for the cookie may be optionally specified (for example: expiration, access restriction, SSL).
public static Set ( string name, object value, System.DateTime expires, string path, string domain, bool secure ) : void
name string The name of the cookie to set.
value object The value to set for the cookie.
expires System.DateTime Specify an expiration date the cookie is to persist until. Note that the specified Date object will be converted to Greenwich Mean Time (GMT).
path string Setting a path on the cookie restricts access to pages that match that path. Defaults to all pages ('/').
domain string Setting a domain restricts access to pages on a given domain (typically used to allow cookie access across subdomains). For example, "ext.net" will create a cookie that can be accessed from any subdomain of ext.net, including www.ext.net, support.ext.net, etc.
secure bool Specify true to indicate that the cookie should only be accessible via SSL on a page using the HTTPS protocol. Defaults to false. Note that this will only work if the page calling this code uses the HTTPS protocol, otherwise the cookie will be created with default options.
return void
        public static void Set(string name, object value, DateTime expires, string path, string domain, bool secure)
        {
            new Cookies().Call("set", name, value, new JRawValue(Ext.Net.Utilities.DateTimeUtils.DateNetToJs(expires)), path, domain, secure);
        }
    }