difference between Page.Request and HttpContext.Current.Request

Discussion in '.NET' started by sripathi, Dec 31, 2009.

  1. sripathi

    sripathi

    Joined:
    Dec 31, 2009
    Messages:
    4
    Hi,

    What is the difference between Page.Request and HttpContext.Current.Request?

    My code uses Page.Request object and iam writing unit test cases to test the functionality of the code. In order to set the Page.Request object in the code I tried setting the HttpContext.Current.Request in the unit test case and run the test case. But the Page.Request object is throwing a System.Web.httpException while HttpContext.Current.Request still exists in the code.

    any thoughts on how can we set the Page.Request object from a unit test case?
     
    Last edited: Dec 31, 2009
    sripathi, Dec 31, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Giovanni Bassi
    Replies:
    0
    Views:
    661
    Giovanni Bassi
    Oct 20, 2003
  2. MarkMurphy

    HttpContext.Current.Request.UserLanguages

    MarkMurphy, Dec 9, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    3,818
    Mike Moore [MSFT]
    Dec 11, 2003
  3. jakk
    Replies:
    4
    Views:
    12,405
  4. jeremy.rice@alkermes.com
    Replies:
    5
    Views:
    2,327
    Dominick Baier [DevelopMentor]
    Nov 8, 2005
  5. Tony

    Dim context As HttpContext = HttpContext.Current

    Tony, Mar 2, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    318
    Teemu Keiski
    Mar 3, 2004
Loading...

Share This Page