1- Add a HtMLinputButton in the markup
<input type="button" onclick="ClearList();" value="Clear Selections">
and add a corresponding javascript:
<script language="javascript">
function ClearList()
{
var list = document.getElementById("ListBox1");
if (list) list.selectedIndex =-1;
}
</script>
2- Add a Button server control:
<asp:Button ID="btnDeselect" Runat="server" Text="De-Select"></asp:Button>
and in the codebehind:
Private Sub btnDeselect_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnDeselect.Click
ListBox1.ClearSelection()
End Sub
3- You can insert a list item with a blank value for the user to click if
you wish them to deselect a previously selected item, e.g.
Dim li As New ListItem("No Selection", "")
listbox1.Items.Insert(0, li)