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
Distinguish between Server-side and Client-side code?
How to display validation messages in one control?
To bind columns manually which tags do you need to add within the asp:datagrid ?
What do you mean by serialize and marshalbyref?
What is distributed system in asp.net?
What are the cookies types in asp.net?
Which is the best institute to learn Microsoft Technologies and the faculty if you Know?
How to do state management in ASP.NET?
What r the asp.net list controls and diff. Between them?
Explain the difference between singleton and single call?
Can you explain how ASP.NET application life cycle and page life cycle events fire?
List of words of preprocessor in .net?
What are the different types of sessions in asp.net?
How many types of cookies are there in asp.net?
Which is an advantage of application service providers?