General information
Title:
DropDownList Out of Range Error
I have a detailsView in my webForm. Inside detailView have a dropdownlist.
The dropdownlist will be populated from a table eg, supplier table which have fields id,supName
The data source the detailsView is pulling data from another table which store supplier id.
If 2nd table store invalid supplier Id (eg. supplier deleted form supplier table or whatever), The error will appear :
System.ArgumentOutOfRangeException: 'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.
Any suggestions to solve the problem would be appreciated.
TIA.
Best Regards,
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only