DorpDownList in DL set by value in Database
Sub dlComponent_databind(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs)
Dim drpMarket As DropDownList = CType(e.Item.FindControl("drpStatus"), DropDownList)
drpMarket.Items.Insert(0, "No Selection Specified")
drpMarket.SelectedValue = Trim(e.Item.DataItem.componentStatus)
drpMarket.Items.Insert(0, "No Selection Specified")
drpMarket.SelectedValue = Trim(e.Item.DataItem.componentStatus)
Dim drpCo As DropDownList = CType(e.Item.FindControl("drpCompany"), DropDownList)
drpCo.Items.Insert(0, "No Selection Specified")
drpCo.SelectedValue = Trim(e.Item.DataItem.company)
End Sub
Comments