Redirect with POST

Discussion in 'ASP .Net' started by Thom Little, Nov 30, 2006.

  1. Thom Little

    Thom Little Guest

    In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and include
    POST data (i.e., formatted like a form. The form data is changed
    dynamically by the C# page.

    Can anyone point me to an example?

    --
    -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    --
     
    Thom Little, Nov 30, 2006
    #1
    1. Advertising

  2. Thom Little

    Thom Little Guest

    Question moved to another newsgroup.

    --
    -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    --

    "Thom Little" <> wrote in message
    news:%...
    > In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and include
    > POST data (i.e., formatted like a form. The form data is changed
    > dynamically by the C# page.
    >
    > Can anyone point me to an example?
    >
    > --
    > -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    > --
    >
    >
    >
     
    Thom Little, Nov 30, 2006
    #2
    1. Advertising

  3. Thom Little

    Thom Little Guest

    Thank you for the lead ...

    To pass a string shouldn't you be able to ...

    Response.ClearHeader( );
    Response.AddHeader( "x", "a=alpha&b=beta" );
    Response.Redirect( strUrl );

    .... while you specify the correct header ("x") for any form without worrying
    about the name?

    --
    -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    --

    "Ciaran O''Donnell" <> wrote in
    message news:...
    >I spoke about this on my blog, you need to send down a response to the
    >client
    > with the form on it, filled in, and use javascript to post that back to
    > the
    > other page. The code is fairly simple, just javascript in the page.
    > window.document.getElementById('formname').submit();
    >
    > Just enure the action is set to the other page. Otherwise that can be
    > changed with js too.
    >
    > --
    >
    > Ciaran O''Donnell
    > http://wannabedeveloper.space.live.com
    >
    >
    > "Thom Little" wrote:
    >
    >> In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and include
    >> POST data (i.e., formatted like a form. The form data is changed
    >> dynamically by the C# page.
    >>
    >> Can anyone point me to an example?
    >>
    >> --
    >> -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    >> --
    >>
    >>
    >>
    >>
     
    Thom Little, Nov 30, 2006
    #3
  4. Thom Little

    Thom Little Guest

    I find your information very helpful and I appreciate you taking the time to
    share it with me.

    I tried to find the article on your Blog and could not find it. Can you
    point me in the right direction?

    Thanks.

    --
    -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    --

    "Ciaran O''Donnell" <> wrote in
    message news:...
    > No, that will send a header down to the client. A response redirect is a
    > normal response to the client like any other except:
    > The status is set to '304 - Object Moved'
    > a location header is included to show the url to go to.
    > a small page is sent to broswer with a link incase it doesnt support 304.
    >
    > Then the browser reads this and starts a whole new request to the new url,
    > passing the old url as the referrer header.
    >
    > There is now way for the redirector to affect this get.
    >
    >
    > --
    >
    > Ciaran O''Donnell
    > http://wannabedeveloper.space.live.com
    >
    >
    > "Thom Little" wrote:
    >
    >> Thank you for the lead ...
    >>
    >> To pass a string shouldn't you be able to ...
    >>
    >> Response.ClearHeader( );
    >> Response.AddHeader( "x", "a=alpha&b=beta" );
    >> Response.Redirect( strUrl );
    >>
    >> .... while you specify the correct header ("x") for any form without
    >> worrying
    >> about the name?
    >>
    >> --
    >> -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    >> --
    >>
    >> "Ciaran O''Donnell" <> wrote in
    >> message news:...
    >> >I spoke about this on my blog, you need to send down a response to the
    >> >client
    >> > with the form on it, filled in, and use javascript to post that back to
    >> > the
    >> > other page. The code is fairly simple, just javascript in the page.
    >> > window.document.getElementById('formname').submit();
    >> >
    >> > Just enure the action is set to the other page. Otherwise that can be
    >> > changed with js too.
    >> >
    >> > --
    >> >
    >> > Ciaran O''Donnell
    >> > http://wannabedeveloper.space.live.com
    >> >
    >> >
    >> > "Thom Little" wrote:
    >> >
    >> >> In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and
    >> >> include
    >> >> POST data (i.e., formatted like a form. The form data is changed
    >> >> dynamically by the C# page.
    >> >>
    >> >> Can anyone point me to an example?
    >> >>
    >> >> --
    >> >> -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    >> >> --
    >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Thom Little, Dec 1, 2006
    #4
  5. Thom Little

    ThunderMusic Guest

    Hi,
    Wouldn't a Server.Transfer(...) do the trick?

    I hope it helps

    ThunderMusic

    "Thom Little" <> wrote in message
    news:%...
    > In ASP.NET 2.0 C# I need to redirect to an .ASP or .HTML page and include
    > POST data (i.e., formatted like a form. The form data is changed
    > dynamically by the C# page.
    >
    > Can anyone point me to an example?
    >
    > --
    > -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    > --
    >
    >
    >
     
    ThunderMusic, Dec 1, 2006
    #5
  6. Thom Little

    Thom Little Guest

    Unfortunately Server.Transfer( ) is restricted to transfer between webspcaes
    on the same server.

    In my case some of the web are on other servers.

    --
    -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
    --

    "ThunderMusic" <> wrote in message
    news:e1MYC%...
    > Hi,
    > Wouldn't a Server.Transfer(...) do the trick?
    >
    > I hope it helps
     
    Thom Little, Dec 2, 2006
    #6
    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. La Jesus
    Replies:
    9
    Views:
    1,355
    Gunnar Hjalmarsson
    Oct 27, 2003
  2. Radek G.
    Replies:
    4
    Views:
    4,172
    Radek G.
    Jun 18, 2004
  3. =?Utf-8?B?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,371
    Srowe1975
    Oct 15, 2008
  4. Sal
    Replies:
    1
    Views:
    1,026
  5. Ron Howard
    Replies:
    2
    Views:
    580
    Ron Howard
    Aug 11, 2004
Loading...

Share This Page