ViewState enabled inside the ASP.NET 2.0 GridView - Take care!

Written on August 30, 2005

For example, if you have a button or other post-back generating control on a form alongside a GridView, and the effect of the button is to modify the underlying database (say it adds a new row to the table being displayed by the GridView), you won't see the changes made to the database when the page is rendered.

Fritz Onion tells you why and how to solve this issue.