Passing Vars to a Page. RRS feed

  • Question

  • User2073724220 posted
    I have a HttpModule that creates a string variable. What I want to do is somehow pass this String to the Page. I only want this variable to be accessable for the current request. Is there any way to do this without using Session State or Rewriting the URL? Thanks
    Thursday, April 22, 2004 3:38 PM

All replies

  • User-1391363652 posted
    Try using the HttpContext.Current.Items items. This collection is good for the duration of a request only.
    Thursday, April 22, 2004 5:35 PM
  • User-886813230 posted
    I can't say that this is a better solution than HttpContext.Contents.Items, but an alternative would be to put the data into a NamedDataSlot on the current thread. This is the same thread that is used in the ASPX code, so you can then retrieve and use it where you need to. HTH
    Saturday, April 24, 2004 1:49 PM