I have a dropdown that is populated through a stored procedire triggered from the chnage of a different drop down.
I am getting the message
Specified argument was out of the range of valid values.
Parameter name: value
does any know what this means so i can start to investigate, I cannot get debug working so I dont knwo where to start looking
-----------------------------------------------
I Have changed code too:
it seems that the dropdown was stroing the indexnumber for the currently selected item in viewstate, and when databinding if the new list of items was not as big as the previous then it couldnt find the index and it would fall over.Code:ddSectorName.SelectedIndex = 0 ddSectorName.DataSource = dsSectorName ddSectorName.DataTextField = "SECT_NM" ddSectorName.DataValueField = "SECT_ID" ddSectorName.DataBind() ddSectorName.Items.Insert(0, "All") ddSectorName.Items(0).Value = "%" ddSectorName.SelectedIndex = 0




Reply With Quote