How do you create a permanent cookie?

Answer Posted / rahul garad

You can set the permanent cookied by setting the expiry
date to the MaxDate

<%
Response.Cookies("username") = "you"
Response.Cookies("username").Expires = Date.MaxValue
%>

Is This Answer Correct ?    70 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can the dictionary object be created in client?s scope ?

1992


What does asp stand for in asp.net?

526


When should I use server transfer and response redirect?

516


What are the different types of Caching techniques in ASP.NET?

579


How to create a db connection at one place/page so that we can use that connection for all pages/forms/windows.what r the steps ned to be performed if question not clear,let me know

705






Elaborate differentiation between Cache and Application?

541


What is state management in .net?

616


List some of the important session state modes of asp.net.

508


Where can I get the details on migration of existing projects using various technologies to asp.net?

522


Explain asp.net page life cycle?

617


What is clr? Difference between clr & cts?

690


Do cookies store passwords?

505


Can we create a multiple user simultaneously ?

588


What is difference between cache and session?

502


How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.

625