how to bind the gridview
I am trying to add data in grid view
SqlDataAdapter da = new SqlDataAdapter("select * from tab", con);
System.Data.DataSet ds = new System.Data.DataSet();
GridView1.DataSource = ds;
GridView1.DataBind();
i am getting the below error please solvee
The IListSource does not contain any data sources.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The IListSource does not contain any data sources.
Source Error:
Line 30: System.Data.DataSet ds = new System.Data.DataSet();
Line 31: GridView1.DataSource = ds;
Line 32: GridView1.DataBind();
Line 33: }
Line 34: