{
if(CheckBox1.Checked==true)
{
Response.Cookies["ASPNET2005"]["Name"]=txtName.Text;
Response.Cookies["ASPNET2005"]["Time"]=DateTime.Now.ToString();
Response.Cookies["ASPNET2005"].Expire=DateTime.Now.AddMonths(1);
}
}
//Button
{
if(Request.Cookies["ASPNET2005"]==null)
Label1.Text="There is no cookies";
else
Label1.Text=Request.Cookies["ASPNET2005']["Name"]+" "+Request.Cookies["ASPNET2005"]["Time"];
}
if(CheckBox1.Checked==true)
{
Response.Cookies["ASPNET2005"]["Name"]=txtName.Text;
Response.Cookies["ASPNET2005"]["Time"]=DateTime.Now.ToString();
Response.Cookies["ASPNET2005"].Expire=DateTime.Now.AddMonths(1);
}
}
//Button
{
if(Request.Cookies["ASPNET2005"]==null)
Label1.Text="There is no cookies";
else
Label1.Text=Request.Cookies["ASPNET2005']["Name"]+" "+Request.Cookies["ASPNET2005"]["Time"];
}
No comments:
Post a Comment