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
Explain the difference between response.redirect vs server.transfer
What is session and cookies in asp.net?
What is asp.net introduction?
Why do we need master page in asp.net?
What are Session states available and its Uses?
What is .net framework and what are the main components of it?
Do session use cookies in asp net?
What is gridview in asp.net?
What are different types of api?
What is the mvc model?
How does output caching work in ASP.NET?
What are session objects?
What is application variable in asp.net?
What is session management in web application?
Define application state variable and session state variable?