public void Obtener() { DataTable Dt = new DataTable(); var notificationRegisterTime = Session["LastUpdated"] != null?Convert.ToDateTime(Session["LastUpdated"]) : DateTime.Now; using (SqlDataAdapter adp = new SqlDataAdapter("cc_obtenerPush", conStr)) { adp.SelectCommand.CommandType = CommandType.StoredProcedure; adp.SelectCommand.Parameters.AddWithValue("@Fecha", notificationRegisterTime); adp.Fill(Dt); } GridView1.DataSource = Dt; GridView1.DataBind(); DtList.DataSource = Dt; DtList.DataBind(); }