protected void blockLinkButton_Click(object sender, EventArgs e) { LinkButton Btn = (LinkButton)sender; GridViewRow row = (GridViewRow)Btn.NamingContainer; string UserId = userListGridView.Rows[row.RowIndex].Cells[0].Text.ToString(); string Status = ""; try { if (userListGridView.Rows[row.RowIndex].Cells[6].Text.ToString() == "Yes") { Status = "No"; } else { Status = "Yes"; } UserBLL userBll = new UserBLL(); userBll.UpdateUserActivation(UserId, Status); string message = " <span class='actionTopic'>" + "Your mail Send Successfully. Please Cheak your Mail Inbox or Spam" + "</span>."; MyAlertBox("var callbackOk = function () { window.location = \"/setting/User/ResetUserPassword.aspx\"; }; SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", callbackOk);"); } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } }