Ask a Question related to ASP.NET General, Design and Development.
-
Bill Priess #1
Re: After pushing IE's "backwards arrow", how can I have my page be dynamically updated ?
Ohhh, this is a fun one... By default, there is no way to trap for a user
pushing the back button or for that matter the back menu (the menu that
drops down when a user presses the drop-down arrow to the right of the back
button). But, here are some things that you can try...
In your page, you can hookup the window.onunload() event in JavaScript and
force a postback using document.forms[0].submit(). The problem with this is
that you would have to dynamically determine where you are in your
application and where you want to go. Not always an easy task. Usually,
what I do is if I am forcing something on the user, I make sure that my web
app uses a new window launched from their previous window. If I need to
disable the back button, I use this code...
<script language="JavaScript1.5">
function NoBackButton()
{
window.alert('Sorry, you cannot navigate using the back button of your
browser. Please use the menu navigation to the top and the left.');
return false;
}
window.onunload = NoBackButton;
</script>
An alternate to this would be:
document.forms[0].submit();
return false;
That will cause a post back to occur with the current values of your page.
HTH,
Bill P.
On Tue, 5 Aug 2003 16:18:23 +0200, pschrader <pschrader@bieber-gruppe.de>
wrote:
> Hi !
>
> I'm modifyinging an ASP.NET application using Visual Studio .NET 2003.
>
> By pushing MS Internet Explorer's "backward arrow",
> I can return to the previously loaded page.
> However, usually (according to my web experience) it'll show exactly as
> it
> was.
> E.g., if previously it showed the time of clock,
> it'll show exactly the same time of clock again.
> I.e., the time of clock is n o t updated dynamically.
> Data from a DB aren't updated either,
> although they may have changed in the meantime.
>
> However, the other day I had the chance to experience a web application
> that was able to dynamically update the contents of a page in this
> situation.
> I don't know how it works, but it can be done.
>
> By experiment (debugger !) I was able to confirm
> that my application doesn't call Page_Load
> when I push the "backwards button".
>
> Can I force my application to make a server round trip
> when IE's "backward button" is pushed ?
> Must I use client side scripting to do the trick ?
>
> How can such dynamical updates be achieved in ASP.NET ?
>
> Your kind help would be appreciated.
>
>
>
--
Using M2, Opera's revolutionary e-mail client: [url]http://www.opera.com/m2/[/url]
Bill Priess Guest
-
"Page" and "Rect" props of the Field prop in Javascript API
Page property of the Field property in Javascript Acrobat API returns an array of pages that this field exists in. On the other hand, "rect" property... -
Can't choose "page setup" or "print" - Mac OS 9x
Hello I have a problem on multiple Macs when using Freehand 10. I have not found any answers on macromedia Support or on the web. Before... -
how to draw a "curly arrow" ...?
Hi Bailee: You have the right tool, but you need to pull out the path control handles to get the curve. Try this: Click on the canvas to... -
Error: "Field canot be updated"
I need some help with "overcoming" an error that is produced in the form/subform mode. Here are the details about the 3 tables that I'm working... -
Change the "web hand" cursor in normal arrow cursor?
Visit my page at http://www.frenchberliner.com and see the swap image...when you fly over it to see the effecct the cursor changes in a small hand as...



Reply With Quote

