This is a migrated thread and some comments may be shown as answers.

ViewState Errors With browser back button

1 Answer 113 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 29 Sep 2008, 10:30 AM

We are using rad ajax panels in our system, and we are getting viewstate erros linked to the members clicking the back button in there browser.

Typical example.

  1. Member views page, and because they are not logged in, just see the login control.
  2. member logs in, and uses site
  3. member click back in browser, but browser has cached page, so they see the login box again
  4. member tries to login again, and gets viewstate error

Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

This doesnt happen,  when we dont use ajax. the member obviously see the login box again, but it doesnt error if they login.

what can we do to stop these viewstate errors while using ajax?

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 01 Oct 2008, 01:15 PM
Hello Steve,

Please review this help topic on how to load user controls with AJAX. Note that the last loaded control should be always recreated on page load.

Give it a try and let us know if this helps.

All the best,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Steve
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or