Código:
private void Cargar1() { SqlConnection con = CNX(); con.Open(); SqlCommand cmd = new SqlCommand("cargaResul, con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@cve", Session["cve"].ToString()); SqlDataReader reader = cmd.ExecuteReader(); if (reader.Read()) { con.Close(); con.Open(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); gvPreg1.DataSource = dt; DataBind(); } }