DropDownList not working


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:

<asp:DropDownList 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.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top