I am using a web service in ASP.NET page, but I am unable to create cookie in web service. After creating a cookie I want to retrieve its value in my on JavaScript function.
Example:
HttpCookie cookie = new HttpCookie("doc1count");
cookie.Value = "my values nitesh";
HttpContext.Response.Cookies.Add(Cookie);
But this code is not working in asmx web service
Also I want to retrieve its value on my ASP.NET page in JavaScript, if this task is not possible using cookies, then how do I do that with session?