Question: I just want an ASP.NET DropDownList with no selected item. Setting SelectedIndex to -1 is of no avail, so far. I am using Framework 3.5 with AJAX, i.e. this DropDownList is within an UpdatePanel.
Here is what I am doing:

```
    protected void Page_Load (object sender, EventArgs e)
    {
        this.myDropDownList.SelectedIndex = -1;
        this.myDropDownList.ClearSelection();

        this.myDropDownList.Items.Add("Item1");
        this.myDropDownList.Items.Add("Item2");
    }

```

The moment I add an element in the DropDown, its SelectedIndex changes to 0 and can be no more set to -1 (I tried calling SelectedIndex after adding items as well)... What I am doing wrong? Ant help would be appreciated!

Answer: 
It's possible to set *selectedIndex* property of *DropDownList* to -1 (i. e. clear selection) using client-side script:

```
<form id="form1" runat="server">
    <asp:DropDownList ID="DropDownList1" runat="server">
        <asp:ListItem Value="A"></asp:ListItem>
        <asp:ListItem Value="B"></asp:ListItem>
        <asp:ListItem Value="C"></asp:ListItem>
    </asp:DropDownList>
    <button id="СlearButton">Clear</button>
</form>

<script src="jquery-1.2.6.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function()
    {
        $("#СlearButton").click(function()
        {
            $("#DropDownList1").attr("selectedIndex", -1); // pay attention to property casing
        })

        $("#ClearButton").click();
    })
</script>

```
Please try below syntax:

```
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue("Select"))

```

or

```
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByText("SelectText"))

```

or 

```
DropDownList1.Items.FindByText("Select").selected =true

```

For more info :
<http://vimalpatelsai.blogspot.in/2012/07/dropdownlistselectedindex-1-problem.html>