title: how to click html button programmatically on Asp button click?
body: <p>I have created popup window using bootstrap with some Text box.This popup window show on my html button click.I will created multiple Asp Button on page-load.I will try to each asp button click after retrieve some value into text box in popup window.
  i try to each asp button click after show on popup window.but,not retrieve value.so,i have one idea my asp button click after automatically click my html button.how i can do this.please help me.followed my code.<br>
  <strong>my html button</strong> </p>
  
  <pre><code> &lt;button id="btn2" type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal"&gt;Create New&lt;/button&gt;
  </code></pre>
  
  <h2>webform1.aspx</h2>
  
  <pre><code>  &lt;form id="form1" runat="server" class="table table-striped " cellspacing="0" width="100%"&gt;           
         &lt;button id="btn2" type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal"&gt;Create New&lt;/button&gt;                       
    &lt;asp:Table ID="Table1" 
              runat="server" 
              class="table table-striped table-bordered" cellspacing="0" width="100%"
              &gt;
              &lt;asp:TableHeaderRow runat="server"     &gt;
                  &lt;asp:TableHeaderCell&gt;Code&lt;/asp:TableHeaderCell&gt;
                  &lt;asp:TableHeaderCell&gt;Name&lt;/asp:TableHeaderCell&gt;
                  &lt;asp:TableHeaderCell&gt;Descrption&lt;/asp:TableHeaderCell&gt;
                   &lt;asp:TableHeaderCell&gt;Sort&lt;/asp:TableHeaderCell&gt;
                  &lt;asp:TableHeaderCell&gt;Enable&lt;/asp:TableHeaderCell&gt;
                   &lt;asp:TableHeaderCell&gt;Action&lt;/asp:TableHeaderCell&gt;
              &lt;/asp:TableHeaderRow&gt;
        &lt;/asp:Table&gt;
  
  
  
    &lt;!-- Modal --&gt;
    &lt;div class="modal fade" id="myModal" role="dialog"&gt;
      &lt;div class="modal-dialog"&gt;
  
        &lt;!-- Modal content--&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-header"&gt;
            &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
            &lt;h4 class="modal-title"&gt;Add New Branch &lt;/h4&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
           &lt;%-- &lt;p&gt;Some text in the modal.&lt;/p&gt;--%&gt;
  
  
  
  
  
          &lt;div class="span3"&gt;
  
  
  
  
                  &lt;div class="field"&gt;
                      &lt;label for="firstname"&gt;Code:&lt;/label&gt;
  
                      &lt;asp:TextBox ID="txt_BranchCode" value="" placeholder="Branch Code"  runat="server" &gt;&lt;/asp:TextBox&gt;
                  &lt;/div&gt; &lt;!-- /field --&gt;
  
                  &lt;div class="field"&gt;
                      &lt;label for="lastname"&gt;Name:&lt;/label&gt; 
  
                      &lt;asp:TextBox ID="txt_BranchName" value="" placeholder="Branch Name"  runat="server" &gt;&lt;/asp:TextBox&gt;
                  &lt;/div&gt; &lt;!-- /field --&gt;
  
  
                  &lt;div class="field"&gt;
                      &lt;label for="email"&gt;Description:&lt;/label&gt;
  
                      &lt;asp:TextBox ID="txt_Descr" value="" placeholder="Description"  runat="server" Height="68px" TextMode="MultiLine"&gt;&lt;/asp:TextBox&gt;
                  &lt;/div&gt; &lt;!-- /field --&gt;
  
                  &lt;div class="field"&gt;
                      &lt;label for="password"&gt;Sort:&lt;/label&gt;
  
                      &lt;asp:TextBox ID="txt_Sort" value="" placeholder="Sort"  runat="server"&gt;&lt;/asp:TextBox&gt;
                  &lt;/div&gt; &lt;!-- /field --&gt;
  
                  &lt;div class="field"&gt;
                      &lt;label for="confirm_password"&gt;Enable:&lt;/label&gt;
  
  
                         &lt;asp:DropDownList ID="dd_Enable" runat="server" Width="160px"&gt;
                             &lt;asp:ListItem&gt;True&lt;/asp:ListItem&gt;
                             &lt;asp:ListItem&gt;False&lt;/asp:ListItem&gt;
                      &lt;/asp:DropDownList&gt;
                  &lt;/div&gt; &lt;!-- /field --&gt;
  
  
  
  
              &lt;div class="login-actions"&gt;             
  
                  &lt;asp:Button ID="btn_Add" class="button btn btn-primary btn-large" runat="server" Text="Add" OnClick="btn_Add_Click" /&gt;
  
  
              &lt;/div&gt; &lt;!-- .actions --&gt;
  
  
  
  
          &lt;/div&gt;  
  
  
  
                  &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
            &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
  
          &lt;/div&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;/form&gt;
  </code></pre>
  
  <h2>webform1.aspx.cs</h2>
  
  <pre><code>        protected void Page_Load(object sender, EventArgs e)
              {
  
  
  
                      RetrieveAzureAsync(sender,e);
  
              }
              async private void RetrieveAzureAsync(object sender, EventArgs e)
              {
                 IMobileServiceTable&lt;BranchList&gt;  BranchTable = client.GetTable&lt;BranchList&gt;();
  
                  List&lt;BranchList&gt; items_list = await BranchTable
                     .Where(branchitem =&gt; branchitem.Enable == true)
                     .ToListAsync();
  
                  int size = items_list.Count();
                  if (size &gt; 0)
                  {
                      for (int i = 0; i &lt; size; i++)
                      {
                          TableRow row = new TableRow();
                          TableCell cell1 = new TableCell();
                          TableCell cell2 = new TableCell();
                          TableCell cell3 = new TableCell();
                          TableCell cell4 = new TableCell();
                          TableCell cell5 = new TableCell();
                          TableCell cell6 = new TableCell();
                          cell1.Text = items_list[i].BranchCode;
                          cell2.Text = items_list[i].BranchName;
                          cell3.Text = items_list[i].Descr;
                          cell4.Text = Convert.ToString(items_list[i].Sort);
                          cell5.Text = Convert.ToString(items_list[i].Enable);
  //my multiple asp button
                          Button btn = new Button();
                          btn.Text = "Edit";
                          btn.ID = items_list[i].Id;
                          btn.Width = 70;
                          btn.CssClass = "btn btn-info btn-lg";
                          btn.Click += new EventHandler(btn_Click);
  
  
  
  
                          cell6.Controls.Add(btn);
  
                          row.Cells.Add(cell1);
                          row.Cells.Add(cell2);
                          row.Cells.Add(cell3);
                          row.Cells.Add(cell4);
                          row.Cells.Add(cell5);
                          row.Cells.Add(cell6);
                          Table1.Rows.Add(row);
  
                      }
                  }
      }
  
       void btn_Click(object sender, EventArgs e)
              {
      //what code for click btn2 programmatically
  
  
              } 
  </code></pre>