title: Show/Hide DIV on ASP.NET dropdown value change
body: <p>I have the following dropdown on my ASP.NET page:</p>
  
  <pre><code>&lt;asp:DropDownList ID="selectAttending" runat="server"&gt;
                &lt;asp:ListItem Value="Select One..."&gt;Select One...&lt;/asp:ListItem&gt;
                &lt;asp:ListItem Value="Yes"&gt;Yes&lt;/asp:ListItem&gt;
                &lt;asp:ListItem Value="No"&gt;No&lt;/asp:ListItem&gt;
              &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>I also have the following script:   </p>
  
  <pre><code>$(function (){
  $("#selectAttending").change(function () { 
  ToggleDropdown(); 
  }); 
  ToggleDropdown();  
  }); 
  
  function ToggleDropdown(){
  if ($("#selectAttending").val() == "No") {
      $("#ifAttending").hide(); 
  } 
  else{
      $("#ifAttending").show(); 
   } 
  }; 
  </code></pre>
  
  <p>The DIV tag I would like to show if they are attending is:
      #ifAttending</p>
  
  <p>Do I need to add an attribute to the dropdown to show/hide on change or is the code just wrong?</p>