Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/05/2012, 16:14
mrprogman
 
Fecha de Ingreso: junio-2011
Mensajes: 329
Antigüedad: 13 años, 8 meses
Puntos: 2
Respuesta: Index was outside the bounds of the array

"ese error es porque estas mandandole un indice que no existe en el array. Verifica que al hacerle split obtengas los 6 parametros que le estas pasando. "


Tengo un dropdown list donde estan los 6 registros q necesito redireccioanar al textbox...a que te refieres con obtener los 6 parametros..?

If DropDownList1.SelectedItem IsNot Nothing Then
Dim Item As [String] = DropDownList1.SelectedItem.Text
Dim Segments As [String]() = Item.Split("-"c)

TextBox1.Text = Segments(0).Trim()
TextBox2.Text = Segments(1).Trim()
TextBox3.Text = Segments(2).Trim()
TextBox4.Text = Segments(3).Trim()
TextBox5.Text = Segments(4).Trim()
TextBox6.Text = Segments(5).Trim()
TextBox6.Text = Segments(6).Trim()
End If