I already searched for possible solutions and I tried the solutions that I searched but none of them really work for me. Everytime I click the link edit button in my gridview to edit certain data I'm having an 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 don't remember changing my codes or whatever so I'm really clueless as to what I need to do to be able to fix it. I tried enableviewstate = "false"
but the gridview disappears everytime I click the link edit button. And also, I click the Edit LinkButton twice. First it just load the same page and when I click again the error will occur saying the Failed to load viewstate. Any suggestions or possible ideas? Thank you very much.
Edited
Okay so I viewed my codes and then I saw that in Page_Load I wrote
If Not Me.IsPostBack Then
Me.BindGrid()
End If
but on my Gridview at ASP.Net I didn't wrote Autpostback = "True"
does it affect this so I'm getting the error? Please help. Thanks