I don't know where you have placed the code you showed, but this can be caused by the page lifecycle.
You need to recreate the controls in the page.init on everey postback/callback. The viewstate gets parsed right after it. If there is a mismatch at that point, asp.net comes up with this viewstate error.
No comments:
Post a Comment