title: How to populate second dropdownlist without postback?
body: <p>I have many dropdownlists and textboxes in a single page. I have done validations on textboxes. Each dropdownlist populate another dropdownlist.
  The problem is, all existing validation messages are disappear when selectedindexchanged event fired. How to populate second dropdownlist without postback?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;asp:Content ID="Content1" ContentPlaceHolderID="mainContentPlaceholder" runat="server"&gt;
      &lt;asp:Panel ID="Panel1" runat="server" CssClass="formattingPanel" ScrollBars="Vertical"&gt;
      &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true"  UpdateMode="Conditional" &gt;
      &lt;ContentTemplate&gt;
      &lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;Title &lt;/td&gt;
          &lt;td&gt;&lt;asp:DropDownList ID="ddlTitle" runat="server" OnSelectedIndexChanged="ddlTitle_SelectedIndexChanged" AutoPostBack="true" /&gt;
               &lt;asp:TextBox ID="txtOther" runat="server" Visible="false" Text="" Width="33%"/&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt; 
          &lt;td&gt;  Nname &lt;/td&gt;
          &lt;td&gt; &lt;asp:TextBox ID="txtName" runat="server" /&gt; &lt;/td&gt;
      &lt;/tr&gt;
         &lt;tr&gt;
          &lt;td&gt; Address1 &lt;/td&gt;
          &lt;td&gt; &lt;asp:TextBox ID="txtAddress1" runat="server" /&gt; &lt;/td&gt;
      &lt;/tr&gt;
       &lt;tr&gt;
          &lt;td&gt; Address2 &lt;/td&gt;
          &lt;td&gt; &lt;asp:TextBox ID="txtAddress2" runat="server"/&gt; &lt;/td&gt;
      &lt;/tr&gt;
            &lt;tr&gt;
          &lt;td&gt; Postcode &lt;/td&gt;
          &lt;td&gt; &lt;asp:TextBox ID="txtPostcode" runat="server" /&gt; &lt;/td&gt;
      &lt;/tr&gt;
           &lt;tr&gt;
          &lt;td&gt; Telephone &lt;/td&gt;
          &lt;td&gt; &lt;asp:TextBox ID="txtTelephone" runat="server" /&gt; 
               &lt;asp:RegularExpressionValidator ID="regexTelephone" runat="server" ControlToValidate="txtTelephone" ErrorMessage ="* Numbers only &amp; no spaces"
                ValidationExpression ="^\d+" ForeColor="Red"&gt; &lt;/asp:RegularExpressionValidator&gt;
           &lt;/td&gt;
      &lt;/tr&gt;
       &lt;tr&gt;
          &lt;td&gt; Email &lt;/td&gt;
          &lt;td&gt; &lt;asp:TextBox ID="txtEmail" runat="server" /&gt; 
               &lt;asp:RegularExpressionValidator ID="regexEmail" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                ControlToValidate="txtEmail" ErrorMessage="* Invalid Email" ForeColor="Red" &gt; &lt;/asp:RegularExpressionValidator&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
         &lt;tr&gt;
          &lt;td&gt;Title 1&lt;/td&gt;
          &lt;td&gt; 
        &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true"  UpdateMode="Conditional"&gt;
              &lt;Triggers&gt;
                  &lt;asp:AsyncPostBackTrigger ControlID="ddlType1" EventName="SelectedIndexChanged" /&gt;
              &lt;/Triggers&gt;
              &lt;ContentTemplate&gt;
              &lt;asp:DropDownList ID ="ddlType1" runat ="server"  OnSelectedIndexChanged="ddlType1_OnSelectedIndexChanged" AutoPostBack="true" /&gt; 
              &lt;asp:DropDownList ID ="ddlSubType1" runat ="server"  Visible="false" /&gt;
              &lt;/ContentTemplate&gt;
          &lt;/asp:UpdatePanel&gt;
          &lt;/td&gt;
         &lt;/tr&gt;
      &lt;tr&gt;        
          &lt;td&gt; Title 2 &lt;/td&gt;
          &lt;td&gt;
          &lt;asp:DropDownList ID ="ddlType2" runat ="server" OnSelectedIndexChanged="ddlType2_OnSelectedIndexChanged" AutoPostBack="true"/&gt;
          &lt;asp:DropDownList ID ="ddlSubType2" runat ="server"  Visible="false"/&gt;
          &lt;/td&gt;
      &lt;tr&gt;
      &lt;tr&gt;        
          &lt;td&gt; Title 3 &lt;/td&gt;
          &lt;td&gt;
          &lt;asp:DropDownList ID ="ddlType3" runat ="server" OnSelectedIndexChanged="ddlType3_OnSelectedIndexChanged" AutoPostBack="true"/&gt;
          &lt;asp:DropDownList ID ="ddlSubType3" runat ="server"  Visible="false"/&gt;
          &lt;/td&gt;
      &lt;tr&gt;
      ---- upto 8 dropdownlist sams as above      
       &lt;tr&gt;
          &lt;td&gt; &lt;asp:Button ID="btnSave" runat="server" Text ="SAVE" OnClick="btnSave_Click"/&gt; &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
   &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;/asp:Panel&gt;
    &lt;/asp:Content&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have done ddl binding using c# code..</p>