How can I set the browser to refresh automatically without losing viewstate

  • Thread starter Thread starter john
  • Start date Start date
J

john

From my code behind file, I can put a line like this in order to make
the page automatically refresh every minute:

Response.AppendHeader("Refresh", 60);

But the viewstate of the controls is lost when I do this (as opposed
to when the page posts back when I click on a button on the page, in
which case the viewstate is preserved). Is there another way to do an
automatic refresh?

thanks in advance.
 
Can you please give me an example how to do this? I am new at
javascript. I have tried putting the following function calls in
javascript for my page and they all cause exceptions (with the form
object being undefined or null):

this.submit();
form.submit();
document.form.submit();
document.forms[0].submit();
document.theform.submit();
document.myform.submit();

thanks
 
I'd suggest a jscript group but.....something like this perhaps

yourFormname is the name in the <FORM...> tag
<SCRIPT LANGUAGE="JavaScript">
setTimeout(yourFormname.submit(),6000);
</SCRIPT>
--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


john said:
Can you please give me an example how to do this? I am new at
javascript. I have tried putting the following function calls in
javascript for my page and they all cause exceptions (with the form
object being undefined or null):

this.submit();
form.submit();
document.form.submit();
document.forms[0].submit();
document.theform.submit();
document.myform.submit();

thanks


"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
use a javascript client-side time to do a form.submit() over 60 seconds.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top