Hi
I have a dynamic drop down list on a page. This all works fine using
Sub assistanceType_SelectedIndexChanged(sender As Object, e As EventArgs)
response.write("<br>Text Selected: " & assistanceType.SelectedItem.text)
response.write("<br>Value Selected: " & assistanceType.SelectedItem.Value)
End Sub
....
Hoevere, I would like to make it so that the inital value selected in the drop down list comes from a value already stored in the database. I have done this for aa textbox by using the code
<asp:TextBox id="drugName" runat="server" Text='<%# DataSet1.FieldValue("drugName", Container) %>' Width="445px"></asp:TextBox>
How would I put the <%# DataSet1.FieldValue("drugName", Container) %> into a drop down list to ensure that that value is the initial value selected, whilst still allowing the user to select any of the other values from the drop down list dynamicly generated by the database?
Thanks
Marcus