Here simple code for createing cookie and value show on button click..!!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
HttpCookie mycookie = new HttpCookie("malvik");
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["malvik"] != null)
{
Response.Write(Request.Cookies["malvik"].Value);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
mycookie.Value = TextBox1.Text;
mycookie.Expires = DateTime.Now.AddMinutes(1);
Response.Cookies.Add(mycookie);
}
protected void btn1_Click(object sender, EventArgs e)
{
Page.Theme = "Theme1";
}
}
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
HttpCookie mycookie = new HttpCookie("malvik");
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Cookies["malvik"] != null)
{
Response.Write(Request.Cookies["malvik"].Value);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
mycookie.Value = TextBox1.Text;
mycookie.Expires = DateTime.Now.AddMinutes(1);
Response.Cookies.Add(mycookie);
}
protected void btn1_Click(object sender, EventArgs e)
{
Page.Theme = "Theme1";
}
}
Such an ideal piece of blog.Thanks for sharing
ReplyDelete.Net Online Course Hyderabad
Good job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work
ReplyDeleteDot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery
kayseriescortu.com - alacam.org - xescortun.com
ReplyDeleteperde modelleri
ReplyDeletesms onay
TURKCELL MOBİL ÖDEME BOZDURMA
nft nasıl alınır
ankara evden eve nakliyat
trafik sigortası
dedektor
web sitesi kurma
Ask kitaplari