protected void buttonPermissionRevoke_ServerClick(object sender, EventArgs e) { try { string nric = ViewState["GridViewPatientSelectedNRIC"].ToString(); patientBLL.RevokePermissions(nric); Bind_GridViewTherapist(); Update_UpdatePanelPermissions(nric); ScriptManager.RegisterStartupScript(this, GetType(), "alert", "toastr['success']('Permissions of " + nric + " has been Rescinded.');", true); } catch { ScriptManager.RegisterStartupScript(this, GetType(), "alert", "toastr['error']('Error occured when Rescinded Permissions of a therapist.');", true); } }