1

I have a gridview on my aspx page, wherein i have item and edit templates, on of the column contains the buttons for the edit and delete, once user click on the edit button the row should be enable for the editing and buttons would be changing to the update and cancel, it works on all the other forms i have created on the site, but on this specific page, whenever user clicks on the edit button, nothing happens, again if he tries, he is presented with this error message:

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.

I didn't understood where i am going wrong.

Does anyone have any idea what would be going wrong with this.

Michiel van Oosterhout
  • 22,839
  • 15
  • 90
  • 132
Abbas
  • 4,948
  • 31
  • 95
  • 161
  • Try building the page or site again, you might have different html from the compiled code. – Adil Aug 04 '13 at 05:25
  • Thanks @Adil for the reply, but that didn't worked, i rebuild website but still same issue – Abbas Aug 04 '13 at 05:42
  • Did you copy paste the code from other page or control, remove all controls keep just one button to do post back if you still get viewstate error – Adil Aug 04 '13 at 05:50
  • I am getting same error but only in IE. Fine with Chrome and Firefox. – Muhammad Saad May 09 '14 at 09:42

0 Answers0