views:

18

answers:

0

I'm really stumped. I have an ASP.NET page (VS 2008, .NET 3.5/SP1) that contains a gridview and below that a few textboxes and a dropdownlist that the user can use to add a record to the gridview.

So, i fill out my form, click my submit button, and I can get the values of the textboxes easily enough, but the dropdownlist.SelectedValue (or SelectedItem or SelectedIndex) is always empty!

It should be so simple, I'd think:

<asp:DropDownList ID="categoryDropDownList" runat="server" DataSourceID="dsCategories"
     DataTextField="CategoryName" DataValueField="EFileCategoryID"
     Width="90%">
 </asp:DropDownList>

So, the dropdownlist is wired up to an ObjectDataSource. It populates it just fine (on the first page load and all subsequent ones), but I just don't seem to be able to retrieve a value from it once the page is submitted.

Any help would be greatly appreciated.