post request and redirect

Discussion in 'Javascript' started by joshtichauer@gmail.com, Jun 6, 2007.

  1. Guest

    Hey, Is there a way to make a javascript post request to MyPage.aspx,
    set a variable on MyPage.aspx, then do a javascript redirect to
    MyPage.aspx and still sustain the value of the variable posted to the
    page in the first place? As of now i'm successfully posting to my aspx
    page, and successfully redirecting as well, but i have been
    unsuccessful with sustaining that variable. I've tried using ViewState
    as well as Session, neither seem to work exactly how i'd like.

    Essencially, I'm trying to send a post request as well as redirect to
    the same page

    Any/All suggestions or other ideas to accomplish this task are
    welcome.

    thanks to all,
    JoshT
     
    , Jun 6, 2007
    #1
    1. Advertising

  2. On Jun 5, 5:34 pm, wrote:
    > Hey, Is there a way to make a javascript post request to MyPage.aspx,
    > set a variable on MyPage.aspx, then do a javascript redirect to
    > MyPage.aspx and still sustain the value of the variable posted to the
    > page in the first place?


    Write the value to a cookie with JavaScript before posting it. Then
    read the value from the cookie with JavaScript after the redirection.

    Peter
     
    Peter Michaux, Jun 6, 2007
    #2
    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,353
    Gunnar Hjalmarsson
    Oct 27, 2003
  2. Brian Birtle
    Replies:
    2
    Views:
    2,185
    John Saunders
    Oct 16, 2003
  3. Darren Oakey

    Redirect and POST

    Darren Oakey, Dec 19, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    553
    vMike
    Dec 19, 2003
  4. Íßêïò
    Replies:
    1
    Views:
    481
    Jason Friedman
    Jul 21, 2010
  5. Sal
    Replies:
    1
    Views:
    1,004
Loading...

Share This Page