- Joined
- Jan 13, 2011
- Messages
- 9
- Reaction score
- 0
I have an aspx page that has a listview. Within the listview I have a column named BADGEID. When inserting the BADGEID as a textbox with the below code, everything works properly:
<asp:TextBox ID="BADGE" runat="server" Text='<%# Bind("BadgeID") %>'
I need this to be a DropDownList and I changed the textbox above to the below:
<aspropDownList ID="BADGE" runat="server" DataSourceID="SqlDataSource2" DataTextField="BADGE" DataValueField="BADGE" />
The listbox contains the items I need but when I send the information, the item selected in the DropDownList is not sent to the database.
Please let me know what I am missing or doing wrong. This is the first aspx with a DropDownList I have ever created.
<asp:TextBox ID="BADGE" runat="server" Text='<%# Bind("BadgeID") %>'
I need this to be a DropDownList and I changed the textbox above to the below:
<aspropDownList ID="BADGE" runat="server" DataSourceID="SqlDataSource2" DataTextField="BADGE" DataValueField="BADGE" />
The listbox contains the items I need but when I send the information, the item selected in the DropDownList is not sent to the database.
Please let me know what I am missing or doing wrong. This is the first aspx with a DropDownList I have ever created.