public bool CheckAdmissionNO(string RegNo) { bool status = false; var credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"], ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]); Portals sup = new Portals(); sup.Credentials = credentials; sup.PreAuthenticate = true; if (sup.FnVerifyStudentRegNo(RegNo) == true) { status = true; KCDFAlert.ShowAlert(status.ToString() + "That Reg No is already taken"); //Session["myStatusIs"] = status; //lblStatus.Text = Session["myStatusIs"].ToString(); } else { status = false; //Session["myStatusIsFalse"] = status; // KCDFAlert.ShowAlert(status.ToString()); CreateStudentUser(); } return(status); }