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
What are HTTP handlers in ASP.NET?
How do session tokens work?
Which method is used to force all the validation controls to run?
In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?
Explain the use of resource manager class in .net.
What are the disadvantages of asp.net?
What are the security types in ASP/ASP.NET? Different Authentication modes?
What is the difference between dynamic SGA and static SGA?
Can we make activex dll also ti execute in some process as that of client ? How can we do?
What are the different methods of session maintenance in asp.net?
What is custom attribute? How to create?
what are the ihttphandler and ihttphandlerfactory interfaces ?
What is the difference between a page theme and a global theme?
How you will handle session when deploying application in more than a server?
Explain advantages of caching?