Set Cookie Domain - CSharp System.Web

CSharp examples for System.Web:Cookie

Description

Set Cookie Domain

Demo Code


using System.Web;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//ww w .j  a va2 s  . c  om

public class Main{

        public static void SetCookieDomain(string name,string domain)
        {
            var httpCookie = HttpContext.Current.Response.Cookies[name];
            if (httpCookie != null)
                httpCookie.Domain = domain;
        }
}

Related Tutorials