title: Dropdownlist Listitems submit to Database
body: <p>I'm just learning to program...I have a dropdownlist like this.</p>
  
  <pre><code>&lt;div&gt;
      &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
      &lt;asp:ListItem &gt;Alabama&lt;/asp:ListItem&gt;
  &lt;asp:ListItem &gt;Alaska&lt;/asp:ListItem&gt;
      &lt;/asp:DropDownList&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Using C# I want to send the selected item to database. Database field is <code>County nvarchar(50) NULL</code>,</p>
  
  <p>I saw some example in C# backend .I found this one on the internet.Can i send above selected item from below coding ?</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
     {
  
         ListItem[] items = new ListItem[3];
         items[0] = new ListItem("One", "1");
         items[1] = new ListItem("Two", "2");
         items[2] = new ListItem("Three", "3");
  
         DropDownList1.Items.AddRange(items);
  </code></pre>