title: ASP.NET - Control dropdownlist postback programmatically
body: <p>I have two dropdownlists on my form-ddl1 and ddl2. They  together determine the visibility of a textbox -txt1. For that I do this check:</p>
  
  <pre><code>if (ddl1.SelectedIndex==2 &amp;&amp; ddl2.SelectedIndex&gt;2)
     {
       if (!txt1.Visible)
          {txt1.Visible=true;// And then I want to call postback}
  
     }
  else
     {
       if (txt1.Visible)
          {txt1.Visible=false;// And then I want to call postback}
     }
  </code></pre>
  
  <p>As you can see, I want to post the page to server only if the above condions are true. The code above is triggered on SelectedIndexChanged event of the both dropdownlists. How can I or is it possible to achieve upon a condition?</p>