Hi,
I am having difficulty with trying to pre-populate a dropdown list from a datareader. The list should bind with the ID from a table to display its text value. For example to display the region "Oregon" the ID=5, "Florida" the ID=12 etc...
this is the code I am using that fails:
ddlRegion.DataV alueField = rdr.GetOrdinal( "regionID").ToS tring();
ddlRegion.DataB ind();
DataBinding: 'System.Data.Da taRowView' does not contain a property with the name '1'
Your feedback will be greatly appreciated !...
Thank you.
I am having difficulty with trying to pre-populate a dropdown list from a datareader. The list should bind with the ID from a table to display its text value. For example to display the region "Oregon" the ID=5, "Florida" the ID=12 etc...
this is the code I am using that fails:
ddlRegion.DataV alueField = rdr.GetOrdinal( "regionID").ToS tring();
ddlRegion.DataB ind();
DataBinding: 'System.Data.Da taRowView' does not contain a property with the name '1'
Your feedback will be greatly appreciated !...
Thank you.
Comment