Re: Session Problem...

From: Max Favilli - Dammela.it (max@dammela.it)
Date: 12/27/02


From: "Max Favilli - Dammela.it" <max@dammela.it>
Date: Thu, 26 Dec 2002 19:46:38 -0800


It's a collection, use ["cookiename"] instead of ("cookiename").

Max

"Khan Imran" <allen_here@hotmail.com> wrote in message
news:#9zMHnOrCHA.2352@TK2MSFTNGP09...
> Thanks for the advise kim but there seems to be a little problem.
> This is coding from a simple test program.
> void Button1_Click(Object sender, EventArgs e)
> {
> Response.Cookies("ASP.NET_SessionId").Value =
Nothing;
> Response.Redirect("Sessiontest.aspx");
> }
> As per your advise i added the the line as you in a test program but i am
> getting an compilation error:
> Compiler Error Message: CS0118: 'System.Web.HttpResponse.Cookies' denotes
a
> 'property' where a 'method' was expected.
> The compilation shows as an error on the line i added.
>
> Any ideas where I am going wrong.(I am kind of a newbe..)
>
> "Kim Bach Petersen" <msnews@kensho.dk> wrote in message
> news:#s9diwBrCHA.2540@TK2MSFTNGP12...
> > It sound like you're trying to do a asp.old thing?
> >
> > The way to go is to use Forms-Based Authentication, then asp.net handles
> it
> > all for you:
> >
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;Q308157
> > http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=433
> >
> > If you insist on using the asp.old way, please beware that sessionid
will
> be
> > reused, thus remeber to add:
> >
> > Response.Cookies("ASP.NET_SessionId").Value = Nothing
> >
> > in your logout procedure. It might be a good idea to place these in
> > Page_init as well:
> >
> > Response.Cache.SetCacheability(HttpCacheability.NoCache)
> > Response.Cache.SetExpires(Now())
> >
> > Kim :o)
> >
> >
>
>