i have problem with clearing selection of listBox. After:
ListBox.ClearSelected();
I receive message about unhandled exception (Object reference not set to an instance of an object).
Does anyone have solution of this problem?
i have problem with clearing selection of listBox. After:
ListBox.ClearSelected();
I receive message about unhandled exception (Object reference not set to an instance of an object).
Does anyone have solution of this problem?
You've not got anything selected in the listbox before calling the ListBox.ClearSelected();
I suggest you do the following:
if(Listbox1.SelectedValue != null){
ListBox.ClearSelected();
}