M
mosscliffe
I have an existing textbox in a formview edit or insert and I wish to
convert it to a DROPDOWNLIST BOX but I can not figure out the syntax
to create the bind that was in the textbox, to how that should be coded
for the DDL
Can anyone please advise
ORIGINAL
<asp:TextBox ID="GenIDTextBox" runat="server" Text='<%# Bind("GenID")
%>'>
</asp:TextBox>
PROPOSED
<aspropDownList ID="DropDownList1" runat="server"
DataSourceID="AccessDataSourceTest"
DataTextField="GenName" DataValueField="GenID">
</aspropDownList>
<asp:AccessDataSource ID="AccessDataSourceTest" runat="server"
DataFile="~/App_Data/TreesAll.mdb"
SelectCommand="SELECT [GenName], [GenID] FROM [Genus] ORDER BY
[GenName]">
</asp:AccessDataSource>
convert it to a DROPDOWNLIST BOX but I can not figure out the syntax
to create the bind that was in the textbox, to how that should be coded
for the DDL
Can anyone please advise
ORIGINAL
<asp:TextBox ID="GenIDTextBox" runat="server" Text='<%# Bind("GenID")
%>'>
</asp:TextBox>
PROPOSED
<aspropDownList ID="DropDownList1" runat="server"
DataSourceID="AccessDataSourceTest"
DataTextField="GenName" DataValueField="GenID">
</aspropDownList>
<asp:AccessDataSource ID="AccessDataSourceTest" runat="server"
DataFile="~/App_Data/TreesAll.mdb"
SelectCommand="SELECT [GenName], [GenID] FROM [Genus] ORDER BY
[GenName]">
</asp:AccessDataSource>