Hi Shamsheer,
I hope, the store procedure that you are calling does'nt hold the results that you are intended to display.
I suggest you to add this condition before reading data from table[0].Like this
public void display()
{
DataSet ds = new DataSet();
ds = DB.ExecuteQuery_SP("displayDetails");
if (ds.Tables.Count > 0 )
{
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
}
else you can refer this
link[
^]
I hope this could help you a bit.
Thanks,
RK