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 basic functionality of garbage collector?
Is there any limit for query string? Means what is the maximum size?
what is the difference between response.write() and response.output.write()?
How do active server pages work?
How long the items in ViewState exists?
How does the cookies work in asp.net?
What is the mvc model?
How can you identify that the page is post back?
What is the adavantage of using ASP.NET routing?
What are all the various Estimation Techniques available ?
What is difference in .net 1.1 and .net 2.0?
what are configuration files?
How can exception be handled with out the use of try catch?
What is Bundling and Minification in MVC?
Describe how to implement globalization and localization in the use interface in .net.