How do you create a permanent cookie?

Answer Posted / preeti

Permanent cookies are the ones that are most useful. Permanent cookies are available until a specified expiration date, and are stored on the hard disk. The location of cookies differs with each browser, but this doesn’t matter, as this is all handled by your browser and the server. If you want to create a permanent cookie called Name with a value of Nigel, which expires in one month, you’d use the following code
Response.Cookies ("Name") = "Nigel"
Response.Cookies ("Name"). Expires = DateAdd ("m", 1, Now ())

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Distinguish between Server-side and Client-side code?

555


How to display validation messages in one control?

551


To bind columns manually which tags do you need to add within the asp:datagrid ?

554


What do you mean by serialize and marshalbyref?

573


What is distributed system in asp.net?

546






What are the cookies types in asp.net?

563


Which is the best institute to learn Microsoft Technologies and the faculty if you Know?

1618


How to do state management in ASP.NET?

602


What r the asp.net list controls and diff. Between them?

510


Explain the difference between singleton and single call?

539


Can you explain how ASP.NET application life cycle and page life cycle events fire?

573


List of words of preprocessor in .net?

522


What are the different types of sessions in asp.net?

494


How many types of cookies are there in asp.net?

539


Which is an advantage of application service providers?

495