title: unable to get dropdownlist selected index value?
body: <p>ON ASPX PAGE ,I have one dropdownlist box and one text box. I have added two items in dropdownlist.</p>
  
  <ol>
  <li><p>Program</p></li>
  <li><p>Batchyear</p></li>
  </ol>
  
  <p>On selected index changeded event, if I select listitem <code>Program</code>, I want the textbox to show</p>
  
  <p><code>your program code is:134</code>.</p>
  
  <p>If I select listitem <code>Batchyear</code>, I want the textbox to show </p>
  
  <p><code>your batch year is 2011</code>.</p>
  
  <p>I write code in cs page</p>
  
  <pre><code> protected void ddl_SelectedIndexChanged(object sender, EventArgs e)
   {
     if (ddl.SelectedIndex == 0)
     { 
       TextBox1.Text="your program code is:134" ;
     }
  
     if (ddl.SelectedIndex == 1)
     { 
        TextBox1.Text="your batch year is 2011" ;
     }
  
   }
  </code></pre>
  
  <p>It is not working. Please help.</p>