Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

How do you create a permanent cookie?

Answers were Sorted based on User's Feedback

How do you create a permanent cookie?..

Answer / surya beniwal

write this cod on submit button : ..........

HttpCookie objCookie = new HttpCookie("UserCookie");
objCookie.Values.Add("UserName", TextBox1.Text);
objCookie.Values.Add("UserPass", TextBox2.Text);

//for permanent cookie .......
objCookie.Expires = DateTime.MaxValue;



Is This Answer Correct ?    7 Yes 1 No

How do you create a permanent cookie?..

Answer / vimal

by setting the expiry property greater than

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is directive in asp net?

0 Answers  

if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some can i implement this.

0 Answers   Siemens,

what is difference between java and .net

11 Answers   Base2 Infotech, Karur Vysya Bank KVB, TATA AIG, TCC,

Hi, I am a fresher. i have a problem related to DataGrid . i have a data grid and i have to place a dropdown in the datagrid.and i have to retrieve the values from the database (sqlserver).please tell me any idea about the code.

1 Answers   Lambent,

How can you handle exceptions in

0 Answers  

What is a proxy in web service?

0 Answers  

Define secured sockets layer.

0 Answers  

how can we display records in single datagrid using two datasets in different place?

2 Answers   Global Computer, Honeywell,

What is a 1x1 pixel?

0 Answers  

What are strong names?

0 Answers  

What is owin authentication?

0 Answers  

What are demand-paging and pre-paging?

0 Answers   MCN Solutions,