How to turn off cookies for one page in your site?

Posted by Saantosh under ASP.NET on 9/5/2009 | Views : 4342 | Status : [Member] | Replies : 2
How to turn off cookies for one page in your site?




Responses

Posted by: Majith on: 9/6/2009 [Member] Starter

Up
0
Down
Greetings santhosh,

A frequent question for interviews.
you have to use the Cookie.Discard Property and you can change in web.config for cookie state false.

Thanks

Saantosh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/7/2009 [Member] [MVP] Bronze

Up
0
Down
Hey,

If you do cookie.discard then don't forget to recreate the cookie on the following page.

Disabling cookies is something that is done at the browser level - by the visitor of the website.

Maybe you could explain your situation and what you are trying to avoid on this special single page?

Saantosh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response