protected void ApplyConsult() { try { var userNme = Session["username"].ToString(); var projctName = Session["projectIs"].ToString(); var refNo = txtPrefNo.Text; var myRNo = Session["myRNo"].ToString(); 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.FnAddConsultantApplication(userNme, myRNo, projctName, refNo) == true) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert('You have Applied for this project!,Go to HOMEPAGE to submit the application');", true); LoadmyApplications(); } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itsABitch", "alert(" + ex.Message + ");", true); } }