protected void Page_Load(object sender, EventArgs e) { DataSet result = new DataSet(); Volunteers objVolunteer = new Volunteers(); int errorCode = objVolunteer.getDetailsOnly(ref result); if (errorCode == 0) { gvVolunteerDetails.DataSource = result.Tables["VolunteerDetails"]; gvVolunteerDetails.DataBind(); } }