Now how in the wolrd does that work? How does it know that some static
method I called on some library was called by a page that had that context?
I have tried it so far with my Utils class, and it works just fine when
called from a page (all my methods are static), but I have also tried it by
spawning a thread that grabs the same HttpContext.Current, and that appears
to be null. So how does HttpContext.Current know which context to grab? im
justa little scared to use thats all, until now all my static methods had
the context passed to them.
The Current static method will work without any problem on the current
thread. If you want to create new thread and work with the context you
can pass it as parameter to the thread. You can see my example: http://www.developersdex.com/gurus/code/662.asp
Natty Gur, CTO
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114