![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
21/03/2007, 03:47
|
| | Fecha de Ingreso: mayo-2006
Mensajes: 178
Antigüedad: 18 años, 8 meses Puntos: 3 | |
Re: Ayuda con dropdownlist Prueba lo siguiente:
dim dt as datatable=.......
Dropdownlist1.DataSource = dt
Dropdownlist1.DataTextField = "Nombre"
Dropdownlist1.DataValueField = "ID"
Dropdownlist1.DataBind()
Con esto preselecciona el elemento que tenga ID=28
Dropdownlist1.SelectedIndex = Dropdownlist1.Items.IndexOf(Dropdownlist1.Items.Fi ndByValue(28)) |