By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,423 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

PostBack before ViewState loaded in Browser give incorrect result

P: n/a
Hi All,

I've noticed that if I click a button before the viewstate has been
transferred to the browser, the viewstate information posted back is
none or part of the ViewState. I verified this using the Fiddler tool
to monitor the requests sent to the server.

This postback causes havoc on the page because the expected data was
missing from the viewstate. Is there a way to ensure that the
viewstate is loaded at the top of the page? This would slow down
loading the graphical elements of the site, but would ensure it worked
correctly.

Thanks,
Cole

May 31 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
the __viewstate hidden field is rendered right after the <formbefore
other controls. its a good as it gets. your viewstate is probably too large.

if this is a real problem, setup a onsubmit hander and a onload hander
in javascript. have the onload set a variable, the on submit can cancel
the submit if onload has not fired.

-- bruce (sqlwork.com)

sc*******@gmail.com wrote:
Hi All,

I've noticed that if I click a button before the viewstate has been
transferred to the browser, the viewstate information posted back is
none or part of the ViewState. I verified this using the Fiddler tool
to monitor the requests sent to the server.

This postback causes havoc on the page because the expected data was
missing from the viewstate. Is there a way to ensure that the
viewstate is loaded at the top of the page? This would slow down
loading the graphical elements of the site, but would ensure it worked
correctly.

Thanks,
Cole
May 31 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.