meta refresh loosing the viewstate on the TextBox

  • Thread starter Thread starter Prodip Saha
  • Start date Start date
P

Prodip Saha

I am sure there is an easy fix for this problem. I am reloading the same
page at an interval using the meta refresh tag in aspx page. This page has
one textbox and one button. The problem is -when the page get posted back to
the server the value of the textbox is gone. How do I preserve the value of
the textbox that I entered in it?

I don't want to use Cache/Session to keep track of the value. That's not an
option.

Thanks for your reply.
Prodip
 
Your problem is that the meta refresh doesn't cause a postback. Rather,
it's a completely new page request. Therefore viewstate is not saved.
Perhaps you should use a javascript timer instead to manually cause a
postback.
Or you could maybe stick with the meta refresh and store data in Session
instead of ViewState.
 
Steve,
That explained the underlying problem (new request). I was using the meta
tag and setting the refresh time according to the work-flow. I will try to
use javascript instead to preserve the viewstate, as you have suggested.

Thank you much.
Prodip
 
Back
Top