
14/03/2012, 07:52
|
 | | | Fecha de Ingreso: agosto-2009 Ubicación: Medellin, Colombia
Mensajes: 59
Antigüedad: 15 años, 6 meses Puntos: 3 | |
Respuesta: actualizar griedview despues de ingresar registro c# Hola Amigo!! ... Prueba con el evento IsPostBack.......
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) {
SqlCommand cmd = new SqlCommand("Select * from usuarios", cn);
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = cmd;
cn.Open();
DataSet objdataset = new DataSet();
adapter.Fill(objdataset);
cn.Close();
GridView1.DataSource = objdataset;
GridView1.DataBind();
}
}
Saludos!!!! |