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
How does http session work?
What are the differences between the response.write() and response.output.write()?
What is session authentication?
What is the Difference between MVC And MVP design pattrens
Can we use MSSql as backend in asp.net...if yes then How.?
What is directive in asp net?
What are client activated objects and server activated objects?
Can you change a Master Page dynamically at runtime?
What is the difference between trace and debug in asp.net?
Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?
Explain transparent caching with aop?
In which event of page cycle is the viewstate available?
Explain about asp.net state management?
What is enableviewstate in asp net?
How to disable validator control by client side JavaScript?