.NET databound lists
Is there any way around the following?
I have a few dropdown lists bound to lookup tables in SQL Server. Some开发者_Go百科 old records imported from a previos version of the system won't open due to data in these fields not matching the current dropdown data.
Other than adding the old data to the lookup table (which I don't want to do), is there a way around this?
I got it. Clumsy but it works,
I catch the error when the page can't open due to the data not being in the dropdown any more, then:
list.Items.Insert(0, new_thing);
list.SelectedIndex = 0;
精彩评论