![]() |
How can I set the browser to refresh automatically without losing viewstate
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. |
Re: How can I set the browser to refresh automatically without losing viewstate
use a javascript client-side time to do a form.submit() over 60 seconds.
-- Curt Christianson Owner/Lead Developer, DF-Software www.Darkfalz.com "john" <johngilmer@yahoo.com> wrote in message news:2947476e.0401291411.225c8053@posting.google.c om... > 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. |
RE: How can I set the browser to refresh automatically without losing viewstate
what about a META refresh tag
jayson |
Re: How can I set the browser to refresh automatically without losing viewstate
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 news:<u9B7oZr5DHA.2696@TK2MSFTNGP09.phx.gbl>... > use a javascript client-side time to do a form.submit() over 60 seconds. > > |
Re: How can I set the browser to refresh automatically without losing viewstate
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" <johngilmer@yahoo.com> wrote in message news:2947476e.0401300642.3bd5a134@posting.google.c om... > 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 news:<u9B7oZr5DHA.2696@TK2MSFTNGP09.phx.gbl>... > > use a javascript client-side time to do a form.submit() over 60 seconds. > > > > |
| All times are GMT. The time now is 09:47 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.