title: Using show.hide on a drop down list in c#?
body: <p>I am validating user input using toolbox controls eg text boxes, drop down lists, I want to when a user selects a option in a drop down list make it either show or hide a Upload control below it.</p>
  
  <p>For example in the code below when lone working is selected as YES Answer, I wish for the file upload control for a Lone working procedure document to be displayed below, but if it was a NO answer I wouldn't want the File upload control to display.</p>
  
  <p>Any help would be much appreciated.Thanks</p>
  
  <pre><code>  &lt;td class="question"&gt;
                               Lone Working:
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:DropDownList ID="DDLONE" runat="server" Width="150px" 
                              OnSelectedIndexChanged="DDLONE_SelectedIndexChanged"&gt;
                              &lt;asp:ListItem Text="Yes"&gt;&lt;/asp:ListItem&gt;
                              &lt;asp:ListItem Text="No"&gt;&lt;/asp:ListItem&gt;
                          &lt;/asp:DropDownList&gt;
                          &lt;span class="mandatory"&gt;*&lt;/span&gt;
                          &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator27" runat="server" ControlToValidate="DDLONE" ErrorMessage=" Required." InitialValue="Please select one..." ForeColor="Red" SetFocusOnError="true"&gt;&lt;/asp:RequiredFieldValidator&gt;
                            &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                            &lt;td class="question"&gt;
                          Lone Working Company Procedure:
                          &lt;/td&gt;
                            &lt;td&gt;
                          &lt;asp:AsyncFileUpload ID="AsyncFileUpload3" runat="server" UploaderStyle="Traditional"
                              PersistedStoreType="Session" CssClass="answer" style="float:left" PersistFile="True" CompleteBackColor="#C3D021" /&gt;
                          &lt;div class="mandatory" style="display:inline"&gt;*&lt;/div&gt;
                        &lt;%--- &lt;asp:RequiredFieldValidator ID="AsyncFileUpload3_RequiredFieldValidator" runat="server" 
                              ErrorMessage=" Required."
                              ForeColor="Red"
                              ControlToValidate="AsyncFileUpload3"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:TextBox ID="txtUplLone" runat="server" style="display:none" MaxLength="0" /&gt; ---%&gt;
  </code></pre>