how to use Response in vb.net module

Discussion in 'ASP .Net' started by Guoqi Zheng, Jun 7, 2004.

  1. Guoqi Zheng

    Guoqi Zheng Guest

    Dear sir,

    I would like to user response.redirect in a class module within an asp.net
    web application. I keep getting an error of
    "Reference to a non-shared member requires an object reference"

    Can some one tell me is it possible to user response.redirect within a code
    mudule and how???

    Thanks in advanced.

    Guoqi Zheng
    guoqi AT meetholland dot com
    Http://www.meetholland.com
    Guoqi Zheng, Jun 7, 2004
    #1
    1. Advertising

  2. Guoqi Zheng

    Patrice Guest

    And the code is. the System.Web.httpContext class should give access to the
    current request outside a page...

    Patrice

    "Guoqi Zheng" <> a écrit dans le message de
    news:%...
    > Dear sir,
    >
    > I would like to user response.redirect in a class module within an asp.net
    > web application. I keep getting an error of
    > "Reference to a non-shared member requires an object reference"
    >
    > Can some one tell me is it possible to user response.redirect within a

    code
    > mudule and how???
    >
    > Thanks in advanced.
    >
    > Guoqi Zheng
    > guoqi AT meetholland dot com
    > Http://www.meetholland.com
    >
    >
    >
    Patrice, Jun 7, 2004
    #2
    1. Advertising

  3. Guoqi Zheng

    Guoqi Zheng Guest

    Thank you very much

    --
    Kind regards

    Guoqi Zheng
    guoqi AT meetholland dot com
    Http://www.meetholland.com

    "Cowboy (Gregory A. Beamer) [MVP]" <> wrote
    in message news:ObMiW%...
    > Here is an example you can use:
    >
    > public static void RedirectMe(string URL)
    > {
    > //Need to pull an application object first
    > HttpApplication ha = HttpContext.Current.ApplicationInstance;
    >
    > //Redirect
    > ha.Response.Redirect(URL);
    > }
    >
    > Attached is a project with the code. See the ASP.NET page, redirect.aspx.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ************************************************
    > Think Outside the Box!
    > ************************************************
    > "Guoqi Zheng" <> wrote in message
    > news:%...
    > > Dear sir,
    > >
    > > I would like to user response.redirect in a class module within an

    asp.net
    > > web application. I keep getting an error of
    > > "Reference to a non-shared member requires an object reference"
    > >
    > > Can some one tell me is it possible to user response.redirect within a

    > code
    > > mudule and how???
    > >
    > > Thanks in advanced.
    > >
    > > Guoqi Zheng
    > > guoqi AT meetholland dot com
    > > Http://www.meetholland.com
    > >
    > >
    > >

    >
    >
    >
    Guoqi Zheng, Jun 7, 2004
    #3
    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. Charles A. Lackman
    Replies:
    2
    Views:
    7,964
    Charles A. Lackman
    Jan 11, 2006
  2. Matthew Wieder

    Response.Write and Response.Redirect

    Matthew Wieder, Jul 17, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    668
    Kevin Spencer
    Jul 17, 2003
  3. Maric Michaud
    Replies:
    0
    Views:
    7,173
    Maric Michaud
    Jun 24, 2006
  4. Replies:
    1
    Views:
    812
  5. _Who
    Replies:
    7
    Views:
    2,612
Loading...

Share This Page