I have the following Cookie Name and Cookie Item in a CBLL class as
public const string COOKIE_NAME_TDR_FILTER = "jS.TDR.Filter";
public const string COOKIE_DF_KEY = "DFKey";
In the Page we try to assign the values to the cookies so it can be used in the called pages, .aspx.cs.
protected string TDRFilterCookieName = CBLL.COOKIE_NAME_TDR_FILTER;
protected string CookieDFKey = CBLL.COOKIE_DF_KEY;
In the .aspx using the javascript I am trying to assign the values for the CookieDFKey. So it can be used later.
var cookie = new Cookie("<%= this.TDRFilterCookieName%>");
cookie.<%= this.CookieDFKey %> = id;
cookie.store();
alert(cookie.<%= this.CookieDFKey %>);
Tried the above code but it throws error like Cookie() is not defined. Please help me with this as I am new to JS Script