![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/02/2005, 14:17
|
![Avatar de Sayra](http://static.forosdelweb.com/customavatars/avatar82193_1.gif) | | | Fecha de Ingreso: diciembre-2004
Mensajes: 365
Antigüedad: 20 años, 2 meses Puntos: 1 | |
Lo puse asi, pero me da erroresde compilado porque ique le falta unos ;, pero ami me parece que estan bien asi
por otro lado cuando lo corro en el web solo carga el primer drop y los otros dos nada
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
DataSet du, DataSet;
SqlConnection MyConnection3, SqlConnection;
SqlDataAdapter MyCommand3, SqlDataAdapter;
DataSet du = New DataSet();
MyConnection3=New SqlConnection("SERVER=MDS01; DATABASE=be; INTEGRATED SECURITY=false;PASSWORD=sa;USER=sa");
MyCommand3 = New SqlDataAdapter("select UbicacionID, Descripcion from Ubicacion Where CiudadID=" &DropDownList2.SelectedItem.Value, MyConnection3);
MyCommand3.Fill(du,"Ubicacion");
DropDownList3.DataSource = du.Tables("Ubicacion").DefaultView;
DropDownList3.DataTextField = "Descripcion";
DropDownList3.DataValueField ="UbicacionID";
DropDownList3.DataBind();
}
private void Dropdownlist2_SelectedIndexChanged(object sender, System.EventArgs e)
{
DataSet du, DataSet;
SqlConnection MyConnection3, SqlConnection;
SqlDataAdapter MyCommand3, SqlDataAdapter;
DataSet du = New DataSet();
MyConnection3 = New SqlConnection("SERVER=MDS01; DATABASE=be; INTEGRATED SECURITY=false;PASSWORD=sa;USER=sa");
MyCommand3 = New SqlDataAdapter("select UbicacionID, Descripcion from Ubicacion Where CiudadID=" &DropDownList2.SelectedItem.Value, MyConnection3);
MyCommand3.Fill(du,"Ubicacion");
DropDownList3.DataSource = du.Tables("Ubicacion").DefaultView;
DropDownList3.DataTextField = "Descripcion";
DropDownList3.DataValueField ="UbicacionID";
DropDownList3.DataBind();
}
private void Dropdownlist3_SelectedIndexChanged(object sender, System.EventArgs e)
{
} |