Quick Newbie Question

Discussion in 'ASP .Net' started by =?Utf-8?B?UnVkeQ==?=, May 17, 2005.

  1. Hi All!
    I have a.aspx with a text field, I can put a value in the text field. Now
    when I go to b.aspx through a response.redirect, that's fine.
    Now when I hit the back button on the browser, my value stays in the text
    field.
    But if I use a Response.redirect command, my text field go blank. How can I
    create a button on my form that does the same as the back browser button. I
    would like the value to stick. And what is the diffrence between a click on
    the back browser, and the other way.

    As Always, Thanks!

    Rudy
    =?Utf-8?B?UnVkeQ==?=, May 17, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?UnVkeQ==?=

    Scott M. Guest

    The reason the value is there when you hit "Back" is because the page is not
    being processed again, the page you see is the browser's cached version of
    the page. You may see a value in the textbox, but the server is completely
    done with the page and doesn't know anything about the textbox at this
    point.

    You could add this, which would simulate what the Back button does:

    <INPUT TYPE="Button" VALUE="Go Back" OnClick="history.back(1)">

    But again, the user will not be re-processing the page with this, only
    seeing the cached version.



    "Rudy" <> wrote in message
    news:...
    > Hi All!
    > I have a.aspx with a text field, I can put a value in the text field. Now
    > when I go to b.aspx through a response.redirect, that's fine.
    > Now when I hit the back button on the browser, my value stays in the text
    > field.
    > But if I use a Response.redirect command, my text field go blank. How can
    > I
    > create a button on my form that does the same as the back browser button.
    > I
    > would like the value to stick. And what is the diffrence between a click
    > on
    > the back browser, and the other way.
    >
    > As Always, Thanks!
    >
    > Rudy
    Scott M., May 18, 2005
    #2
    1. Advertising

  3. Thanks Scott! Just what I needed!

    Rudy

    "Scott M." wrote:

    > The reason the value is there when you hit "Back" is because the page is not
    > being processed again, the page you see is the browser's cached version of
    > the page. You may see a value in the textbox, but the server is completely
    > done with the page and doesn't know anything about the textbox at this
    > point.
    >
    > You could add this, which would simulate what the Back button does:
    >
    > <INPUT TYPE="Button" VALUE="Go Back" OnClick="history.back(1)">
    >
    > But again, the user will not be re-processing the page with this, only
    > seeing the cached version.
    >
    >
    >
    > "Rudy" <> wrote in message
    > news:...
    > > Hi All!
    > > I have a.aspx with a text field, I can put a value in the text field. Now
    > > when I go to b.aspx through a response.redirect, that's fine.
    > > Now when I hit the back button on the browser, my value stays in the text
    > > field.
    > > But if I use a Response.redirect command, my text field go blank. How can
    > > I
    > > create a button on my form that does the same as the back browser button.
    > > I
    > > would like the value to stick. And what is the diffrence between a click
    > > on
    > > the back browser, and the other way.
    > >
    > > As Always, Thanks!
    > >
    > > Rudy

    >
    >
    >
    =?Utf-8?B?UnVkeQ==?=, May 18, 2005
    #3
  4. =?Utf-8?B?UnVkeQ==?=

    Scott M. Guest

    HTH :)


    "Rudy" <> wrote in message
    news:...
    > Thanks Scott! Just what I needed!
    >
    > Rudy
    >
    > "Scott M." wrote:
    >
    >> The reason the value is there when you hit "Back" is because the page is
    >> not
    >> being processed again, the page you see is the browser's cached version
    >> of
    >> the page. You may see a value in the textbox, but the server is
    >> completely
    >> done with the page and doesn't know anything about the textbox at this
    >> point.
    >>
    >> You could add this, which would simulate what the Back button does:
    >>
    >> <INPUT TYPE="Button" VALUE="Go Back" OnClick="history.back(1)">
    >>
    >> But again, the user will not be re-processing the page with this, only
    >> seeing the cached version.
    >>
    >>
    >>
    >> "Rudy" <> wrote in message
    >> news:...
    >> > Hi All!
    >> > I have a.aspx with a text field, I can put a value in the text field.
    >> > Now
    >> > when I go to b.aspx through a response.redirect, that's fine.
    >> > Now when I hit the back button on the browser, my value stays in the
    >> > text
    >> > field.
    >> > But if I use a Response.redirect command, my text field go blank. How
    >> > can
    >> > I
    >> > create a button on my form that does the same as the back browser
    >> > button.
    >> > I
    >> > would like the value to stick. And what is the diffrence between a
    >> > click
    >> > on
    >> > the back browser, and the other way.
    >> >
    >> > As Always, Thanks!
    >> >
    >> > Rudy

    >>
    >>
    >>
    Scott M., May 18, 2005
    #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. Wizard
    Replies:
    2
    Views:
    355
    Saravana
    Jan 3, 2005
  2. Starwynd
    Replies:
    1
    Views:
    382
    Tor Iver Wilhelmsen
    Nov 23, 2003
  3. JKop
    Replies:
    11
    Views:
    846
  4. Dilip
    Replies:
    5
    Views:
    309
    Fei Liu
    Apr 21, 2006
  5. Robocop

    quick newbie syntax question

    Robocop, Oct 20, 2008, in forum: Python
    Replies:
    5
    Views:
    243
    Steven D'Aprano
    Oct 20, 2008
Loading...

Share This Page