I'm getting a nonsensical error when binding a DataTable with one row
to a DropDownList.
The DataTable's row contains the fields "id" (INT), "description"
(VARCHAR) and with a couple other unused fields.
I'm binding the table in code behind:
DataTable table=Publishinggroup.GetPublisheegroups(person.Id );
ddlPublishSource.DataSource=table;
ddlPublishSource.DataBind();
And in the aspx page, it's:
<asp:DropDownList ID="ddlPublishSource" runat="server"
DataValueField="id" DataTextField="description" />
But the error that occurs on the DataBind() command is nonsensical,
because there are no column names and no values with a value of
"value":
Specified argument was out of the range of valid values. Parameter
name: value
Any ideas on what might cause that?
Thanks,
-Mike