How do you create a permanent cookie?

Answer Posted / bhim bharti

Permanent cookies are available until a specified expiration date, and are stored on the hard disk.So Set the 'Expires' property any value greater than DataTime.MinValue with respect to the current datetime. If u want the cookie which never expires set its Expires property equal to DateTime.maxValue.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long does an http session last?

531


What is the difference between login controls and forms authentication?

546


Explain the difference between dataset and datareader.

535


What are the different web pages?

497


What do you understand by aggregate dependency?

618






Which method is used to force all the validation controls to run?

555


Explain the difference between debug.write and trace.write?

540


How should I destroy my objects in asp.net?

603


What are web beacons used for?

550


Is asp.net and .net same?

547


Differentiate strong typing and weak typing

530


Where is cookie used in asp.net?

578


Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?

540


How can you register a custom server control to a web page?

551


What is the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

546