gridview值未传递到引导模式弹出窗口

时间:2018-11-23 10:09:40

标签: asp.net ado.net

受保护的void GridViewStaff_RowCommand(对象发送者,GridViewCommandEventArgs e)         {             // int index = Convert.ToInt32(((sender as LinkBut​​ton).NamingContainer as GridViewRow).RowIndex);             整数索引= Convert.ToInt32(e.CommandArgument);

        if (e.CommandName.Equals("editRecord"))
        {
            GridViewRow gvrow = GridViewStaff.Rows[index];
            txtfirstNAme.Text = HttpUtility.HtmlDecode(gvrow.Cells[3].Text).ToString();
            txtLastName.Text = HttpUtility.HtmlDecode(gvrow.Cells[7].Text);
            txtCountry.Text = HttpUtility.HtmlDecode(gvrow.Cells[4].Text);
            lblResult.Visible = false;
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");
            sb.Append("$('#editModal').modal('show');");
            sb.Append(@"</script>");
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "EditModalScript", sb.ToString(), false);

        }

0 个答案:

没有答案