title: Asp.net Dropdownlist selected item value
body: <p>I have a problem with the <code>SelectedItem</code> in the <code>DropDownList</code> </p>
  
  <pre><code>&lt;asp:DropDownList ID="Etkin_Drop" runat="server" OnSelectedIndexChanged="Etkin_Drop_SelectedIndexChanged"&gt;
       &lt;asp:ListItem Text="Seç" Value="-1" Selected="True"&gt;&lt;/asp:ListItem&gt;
       &lt;asp:ListItem Text="Aktif" Value="1"&gt;&lt;/asp:ListItem&gt;
       &lt;asp:ListItem Text="Deaktif" Value="0"&gt;&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>First list item value is <code>-1</code> but when I want to check in the if statement its not working</p>
  
  <pre><code>protected void Etkin_Drop_SelectedIndexChanged(object sender, EventArgs e)
  {
      if (Convert.ToInt32(Etkin_Drop.SelectedItem.Value) == -1)
      {
          ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Lütfen Bir Seçim Yapınız');", true);
      }
      else
      {
          Label4.Text = Etkin_Drop.SelectedItem.Value;
      }
  }
  </code></pre>
  
  <p>I could not define the problem </p>