I have a problem in adding a button to a page. When I add a simple button to a page and reload the page it loads correctly but when I click on the button I get the following 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."
What is it about and how can I get rid of it?
I am using VS2010 with .Net framework 4.0.
Thanks is advanced.