title: using modal in gridview row editing C#
body: <p>this is my bootstrap modal</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal"&gt;
              &lt;div class="modal-dialog"&gt;
                  &lt;div class="modal-content"&gt;
                      &lt;div class="modal-header"&gt;
                          &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
                              &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
                          &lt;h4 class="modal-title"&gt;
                              &lt;/h4&gt;
                      &lt;/div&gt;
                      &lt;div class="modal-body"&gt;
                          &lt;asp:Label ID="lblMessage" runat="server" /&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;button type="button" class="btn btn-primary"&gt;
                              Save changes&lt;/button&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;!-- /.modal-content --&gt;
              &lt;/div&gt;
              &lt;!-- /.modal-dialog --&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>i want to open the modal on button click,</p>
  
  <p>the button is on my gridview item template,</p>
  
  <p>my button look like this</p>
  
  <pre><code>&lt;ItemTemplate&gt;
            &lt;asp:LinkButton ID="btnedit" runat="server" data-toggle="modal" data-target="#myModal" CommandName="Edit" Text="Edit" CssClass="btn btn-warning" Width="100%"&gt;&lt;/asp:LinkButton&gt;
  &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>and now i have created a protected void method on row editing,</p>
  
  <p>which looks like this</p>
  
  <pre><code>protected void dgvEdit_RowEditing(object sender, GridViewEditEventArgs e)
          {
              dgvEdit.EditIndex = e.NewEditIndex;
              int index = e.NewEditIndex;
              LoadGridTask("EDIT", Session["CurrentUser"].ToString(), Session["TaskID"].ToString());
  
              Label taskinmodal = dgvEdit.Rows[index].FindControl("lblTaskName")as Label;
              Response.Write(taskinmodal.Text);
  
              ClientScript.RegisterStartupScript(this.GetType(), "alert", "ShowPopup();", true);
              this.lblMessage.Text = taskinmodal.Text;
          }
  </code></pre>
  
  <p>the problem is when i add the code of my modal and set target id to my modal,</p>
  
  <p>the code in <code>dgvEdit_RowEditing</code> not executing,</p>
  
  <p>i want to add the value of my gridview row in my modal,</p>
  
  <p>i think this is preventing my modal(<code>data-toggle="modal" data-target="#myModal"</code> to executing <code>CommandName="Edit"</code>)</p>
  
  <p>what i need to do?</p>