|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
cookies in asp.netI'm creating a cookie in the http context as follows: Dim objCookie As HttpCookie = New HttpCookie("UserDetails") objCookie.Values.Add("UserName", rRow("UserName")) Response.Cookies.Add(objCookie) When I try to delete the cookie using: Response.Cookies.Remove("UserDetails") it doesn't remove the cookie from the browser cache. Is this the correct syntax for creation and removal of asp.net cookies? Thanks, Peter -- fiddlewidawiddum Not really. Just set the cookie's expiration date to a time in the past
like now minus one minute. See: http://www.codeproject.com/aspnet/aspnetcookies.asp for more details. Show quoteHide quote "Stimp" <r**@spumco.com> wrote in message news:slrner7s96.qil.ren@murphy.redbrick.dcu.ie... > hi all, > > I'm creating a cookie in the http context as follows: > > Dim objCookie As HttpCookie = New HttpCookie("UserDetails") > objCookie.Values.Add("UserName", rRow("UserName")) > > Response.Cookies.Add(objCookie) > > > When I try to delete the cookie using: > > Response.Cookies.Remove("UserDetails") > > > it doesn't remove the cookie from the browser cache. > > Is this the correct syntax for creation and removal of asp.net cookies? > > Thanks, > Peter > > -- > > fiddlewidawiddum On Sun, 21 Jan 2007 Scott M. <s-mar@nospam.nospam> wrote:
> Not really. Just set the cookie's expiration date to a time in the past groovy thanks!> like now minus one minute. > See: http://www.codeproject.com/aspnet/aspnetcookies.asp for more details. Show quoteHide quote > > > "Stimp" <r**@spumco.com> wrote in message > news:slrner7s96.qil.ren@murphy.redbrick.dcu.ie... >> hi all, >> >> I'm creating a cookie in the http context as follows: >> >> Dim objCookie As HttpCookie = New HttpCookie("UserDetails") >> objCookie.Values.Add("UserName", rRow("UserName")) >> >> Response.Cookies.Add(objCookie) >> >> >> When I try to delete the cookie using: >> >> Response.Cookies.Remove("UserDetails") >> >> >> it doesn't remove the cookie from the browser cache. >> >> Is this the correct syntax for creation and removal of asp.net cookies? >> >> Thanks, >> Peter >> >> -- >> >> fiddlewidawiddum > > -- fiddlewidawiddum
How can validator code get the FormView data object
Using Custom Control in a FormView #include for a DropDownList? Using Ajax control in custom server control How to show initial default values in a detailsview form Can I Use RequiredFieldValidator inside a repeater ? Have validators take up no space if control is valid Why can't I get the FormView control's Paging controls to show? open explorer from asp.net? AutoComplete in ASP:TextBox control in ASP.NET 1.1 |
|||||||||||||||||||||||