public DataTable select_data()
{
cmd = new SqlCommand("profile_select",cnn);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
return dt;
}
Aspx.cs
public void bindgrid()
{
DataTable dt=objdal.select_data();
GridView1.DataSource = dt;
GridView1.DataBind();
}