62,268
社区成员
发帖
与我相关
我的任务
分享
protected void grdSingle_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Update")
{
int index = Int32.Parse(e.CommandArgument.ToString());
int id = Int32.Parse(grdSingle.Rows[index].Cells[1].Text);
Response.Redirect("UpdateSingle.aspx?id=" + id);
}
else if (e.CommandName == "Delete")//想在这加个弹出对话框!
{
int index = Int32.Parse(e.CommandArgument.ToString());
int id = Int32.Parse(grdSingle.Rows[index].Cells[1].Text);
try
{
db.DeleteUser(id);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
bindSingle();
DeleteDadPaper();
}
}