title: how to set item in DropDownList when DropDownList don't have item. in asp.net
body: <p>How to set item in DropDownList when DropDownList don't have item. </p>
  
  <p>In asp.net simple code</p>
  
  <pre><code>&lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
      &lt;asp:ListItem&gt;C#&lt;/asp:ListItem&gt;
      &lt;asp:ListItem&gt;VB&lt;/asp:ListItem&gt;
      &lt;asp:ListItem&gt;java&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  
  
  protected void Page_Load(object sender, EventArgs e)
  {
     TextBox1.Text = "php";
     if ( DropDownList1.Text == TextBox1.Text)
     {
         DropDownList1.Text = TextBox1.Text;
      }
      else
      {
         TextBox2.Text = TextBox1.Text;
       }
  }
  </code></pre>