B
branton ellerbee
HAs anyone ever had the problem of coded and tested DropDownList just stop
working?
I have.
Here is the code:
Dim OTID as Double = 1
'set the var from the recordset
OTID = DReader("ordertypeID_fk")
'Populate the dropdown and select the item with the ID returned from the DB
ExecSql = "SELECT * FROM vw_GetOrderType"
lstOrderType.DataSource = fetchData(ExecSQL, "otype", DSN)
lstOrderType.DataBind ( )
lstOrderType.items.FindByValue(OTID).selected = true
Code one the page:
<asp
ropDownList id="lstOrderType" runat="server"
DataTextField = "vcOrderType"
DataValueField = "ordertypeID_pk" />
But it doesn't set the value like it should. It just defaults to the first
item in the DropDown.
What is the deal. The code worked when I wrote it and it works else where in
the application. Anyone ever seen this before?
working?
I have.
Here is the code:
Dim OTID as Double = 1
'set the var from the recordset
OTID = DReader("ordertypeID_fk")
'Populate the dropdown and select the item with the ID returned from the DB
ExecSql = "SELECT * FROM vw_GetOrderType"
lstOrderType.DataSource = fetchData(ExecSQL, "otype", DSN)
lstOrderType.DataBind ( )
lstOrderType.items.FindByValue(OTID).selected = true
Code one the page:
<asp

DataTextField = "vcOrderType"
DataValueField = "ordertypeID_pk" />
But it doesn't set the value like it should. It just defaults to the first
item in the DropDown.
What is the deal. The code worked when I wrote it and it works else where in
the application. Anyone ever seen this before?