cookies in .net
-
Hi want to go for cookie concept..., When my user click a button a cookie have to save..., after that if he click once agian another cookie also want to save with already existed cookie..., and finally i want to get all the cookies..., plz give me some idea reg this...,
Thanks & Regards, Member 3879881, please don't forget to vote on the post
-
Hi want to go for cookie concept..., When my user click a button a cookie have to save..., after that if he click once agian another cookie also want to save with already existed cookie..., and finally i want to get all the cookies..., plz give me some idea reg this...,
Thanks & Regards, Member 3879881, please don't forget to vote on the post
i am using 2 textboxes and a checkbox and button: //code for aspx.cs page: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { HttpCookie coo = Request.Cookies["Info"]; if (coo != null) { txtfirst.Text = coo["name"]; txtsecond.Text = coo["name1"]; } } } protected void Button1_Click(object sender, EventArgs e) { if (CheckBox1.Checked == true) { HttpCookie cook = new HttpCookie("Info"); cook["name"] = txtfirst.Text.ToString(); cook["name1"] = txtsecond.Text.ToString(); cook.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(cook); } } //Add this line in web.config. < sessionState cookieless="UseCookies" />
Padmanabhan My Articles[^]
-
i am using 2 textboxes and a checkbox and button: //code for aspx.cs page: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { HttpCookie coo = Request.Cookies["Info"]; if (coo != null) { txtfirst.Text = coo["name"]; txtsecond.Text = coo["name1"]; } } } protected void Button1_Click(object sender, EventArgs e) { if (CheckBox1.Checked == true) { HttpCookie cook = new HttpCookie("Info"); cook["name"] = txtfirst.Text.ToString(); cook["name1"] = txtsecond.Text.ToString(); cook.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(cook); } } //Add this line in web.config. < sessionState cookieless="UseCookies" />
Padmanabhan My Articles[^]
-
welcome :) :) :)
Padmanabhan My Articles[^]
-
i am using 2 textboxes and a checkbox and button: //code for aspx.cs page: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { HttpCookie coo = Request.Cookies["Info"]; if (coo != null) { txtfirst.Text = coo["name"]; txtsecond.Text = coo["name1"]; } } } protected void Button1_Click(object sender, EventArgs e) { if (CheckBox1.Checked == true) { HttpCookie cook = new HttpCookie("Info"); cook["name"] = txtfirst.Text.ToString(); cook["name1"] = txtsecond.Text.ToString(); cook.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(cook); } } //Add this line in web.config. < sessionState cookieless="UseCookies" />
Padmanabhan My Articles[^]
its not what i asked dera, i asked if cookie will be there with that new cookie also have to add like insert concept...,not update concept
Thanks & Regards, Member 3879881, please don't forget to vote on the post