Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Quick Newbie Question

Reply
Thread Tools

Quick Newbie Question

 
 
=?Utf-8?B?UnVkeQ==?=
Guest
Posts: n/a
 
      05-17-2005
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
 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      05-17-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UnVkeQ==?=
Guest
Posts: n/a
 
      05-18-2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      05-18-2005
HTH


"Rudy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick question, hopefully quick answer. ~misfit~ NZ Computing 114 01-06-2005 01:36 PM
Quick Question Quick Answer JKop C++ 11 05-24-2004 09:46 PM
Quick Restore for a Compaq not so quick! Croos Bustamunky Computer Support 2 05-15-2004 04:17 AM
PanasonicBQ390 "quick" charger - How quick? Ol' Bab Digital Photography 1 01-17-2004 06:54 AM



Advertisments