Response.Cookies["userName"].Value = "ddd";
<%
if (Request.Cookies["userName"] != null)
{
HttpCookie aCookie = Request.Cookies["userName"];
var a =aCookie.Value;
}
%>
function getcookie() { var username = document.cookie.split(";")[0].split("=")[1];
alert(username); }