The
AjaxControlToolkit ComboBox
behaves similarly as the standard ASP.NET
DropDownList
control, so technically, you can't clear the text just what you normally do with the standard
TextBox
control using the
.Text
property.
What you can do is insert an empty value to your
ComboBox
like this on
Page_Load
event:
ComboBox1.Items.Insert(0, New ListItem(""))
Now, this will put an empty string in your
ComboBox
list. You can then call:
ComboBox1.ClearSelection();
to reset the
SelectedIndex
to the default item or you could remove the empty value if you'd like something like:
ComboBox1.Items.Remove("");