I am having a problem binding a DropDown list control to a view. The strange thing is that the code used to work, and actually still works for customer but I wanted to check something and when running the page I am hitting this error.
The error is :
Specified argument was out of the range of valid values. Parameter
name: value
The error is in the following segment of code:
cmbBuildings.DataSource = bldView;
cmbBuildings.DataTextField = "LongName";
cmbBuildings.DataValueField = "FldValue";
cmbBuildings.DataBind(); // This is the error line
The view bldView is based on a dataset and the dataset is created from an XML file. The XML is very simple and I have not change it for a long time.
Any suggestion what I should check, please?
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham