[02/03] dropDownList.SelectedIndexChanged
i've written following code but the problem is it doesnot change the value "txtModelCode" everytime; another value is selected from the dropdown list
VB Code:
Private
Sub dropModels_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dropModels.SelectedIndexChanged
Dim objEquipment As BusinessLogicLayer.Equipments = Equipments.GetModelCode(dropModels.SelectedItem.Value)
txtModelCode.Text = objEquipment.ModelCode
End Sub
while the values are loaded during page load
VB Code:
Private
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If
Not Page.IsPostBack Then
dropModels.DataSource = Equipments.GetAllModels
dropModels.DataTextField = "Model"
dropModels.DataBind()
Dim
objEquipment As BusinessLogicLayer.Equipments = Equipments.GetModelCode(dropModels.SelectedItem.Value)
txtModelCode.Text = objEquipment.ModelCode
End
If
End Sub
Re: [02/03] dropDownList.SelectedIndexChanged