title: How to enable or disable a asp button on dropdown selection value using Javascript function?
body: <p>I have  asp dropdown and button, I want to make the button always disable when dropdown selected value is index 0 and enable when some other value is selected.</p>
  <p>My code, but it is not working:</p>
  <pre><code>function checkSelect()
  {
  if (document.getElementById('ddlSte').value == 'Select One')
     document.getElementById('StGoBtn').disabled = true;
  else
     document.getElementById('StGoBtn').disabled = false;
  }
  </code></pre>
  <p>controls:</p>
  <pre><code>&lt;asp:DropDownList ID=&quot;ddlSte&quot; runat=&quot;server&quot; Width=&quot;162px&quot; onchange='checkSelect(this);'&gt;
               &lt;/asp:DropDownList&gt;
                                                      
   &lt;asp:Button ID=&quot;StGoBtn&quot; CssClass=&quot;buttnStyle&quot; runat=&quot;server&quot; Text=&quot;GO&gt;&gt;&quot;&gt;&lt;/asp:Button&gt;
  </code></pre>