protected void AssignButton_Click(object sender, EventArgs e, int userID, string date) { try { bool confirmation = false; if (date == "") { Response.Write("<script language='javascript'>window.alert('You must select a date for the interview.');</script>"); } else { int jobPostingID = Convert.ToInt32(Request["JobPostingID"]); PRMS controller = new PRMS(); confirmation = controller.AssignCandidateToJobPosting(userID, jobPostingID, date); if (confirmation) { Response.Redirect(Request.RawUrl); } else { } } } catch (Exception) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(‘Error occurred with assigning candidate. Please contact customer support for assistance if this issue persists.’)", true); } }