HttpContext

Discussion in 'ASP .Net' started by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, Nov 13, 2007.

  1. =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, Nov 13, 2007
    #1
    1. Advertising

  2. "Alhambra Eidos Kiquenet" <>
    wrote in message news:...
    > Hi misters,
    >
    > if I have HttpContext, how I get Page reference ??
    >
    > Which is the best way to get it ??
    >



    (Page)ctx.Handler



    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Nov 13, 2007
    #2
    1. Advertising

  3. "Anthony Jones" wrote:
    > (Page)ctx.Handler


    Thanks mister.

    Is it works for any case ?? If I have an .ashx ??

    Greetings...
    =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, Nov 13, 2007
    #3
  4. "Alhambra Eidos Kiquenet" <>
    wrote in message news:...
    > "Anthony Jones" wrote:
    > > (Page)ctx.Handler

    >
    > Thanks mister.
    >
    > Is it works for any case ?? If I have an .ashx ??


    ashx is a "Raw" handler. The class in an ashx is not required to derive
    from any base class it is only required to implement IHttpHandler. If
    you've got a HttpContext and your not sure whether the handler is an ashx or
    aspx or even something else then initially you can only realy on
    IHttpHandler being implemented.

    From there you may be able to use other code to discover other interfaces
    being supported by the returned object.

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Nov 13, 2007
    #4
    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. Claudio Biagioli
    Replies:
    2
    Views:
    4,546
    William F. Robertson, Jr.
    Jun 25, 2003
  2. w. jORDAN

    Questions on HttpContext

    w. jORDAN, Jun 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    423
    w. jORDAN
    Jul 1, 2003
  3. Shawn
    Replies:
    0
    Views:
    467
    Shawn
    Jul 15, 2003
  4. memememe

    HttpContext.Current

    memememe, Jul 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    345
    Natty Gur
    Jul 20, 2003
  5. Tony

    Dim context As HttpContext = HttpContext.Current

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

Share This Page