HttpContext.Current

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • memememe

    #1

    HttpContext.Current

    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.Cur rent, and that appears
    to be null. So how does HttpContext.Cur rent 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.


  • Natty Gur

    #2
    Re: HttpContext.Cur rent

    Hi,

    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:


    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    Working...