Hello everyone,
I have a Webform with TextBoxes, Button and a GridView control with delete button column. On button click I am creating a DataTable then setting the TextBox values to DataTable columns and bind the GridView with DataTable, then to maintain the state I am using ViewState["CurrentTable"] till here, my code works fine but on clicking delete I am getting the below error. I am unable to figure out kindly help me.
"Type 'System.Web.UI.WebControls.GridView' in Assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable"