Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Is it expected behavor?


Message #1 by "alkapin" <alkapin@h...> on Thu, 21 Feb 2002 09:36:02
Here is example, 3 lines of code:



1)HttpCookie cookie = new HttpCookie ("cookiename");

2)Response.Cookies.Add (cookie);

3)HttpCookie cookie2 = Request.Cookies["cookiename"];





I set breakpoint on line (2)

When execution stops on line 2 cookie2 from line3 is null, which is 

correct.

But why the HELL after I execute line 2 and stop on line 3, Request.Cookies

["cookiename"] return valid cookie?!?!?!   I've just added cookie to 

response cookies collection, right? And Request.Cookies["cookiename"] must 

return cookies collection from client. It must still be null. Why the hell 

they reflect each other?








  Return to Index