protected void loginbtn_Click(object sender, EventArgs e) { Userbll user = new Userbll(); bool UserValidate; string Email = loginEmail.Text; string Password = loginPassword.Text; try { UserValidate = user.ValidateUser(Email, Password); if (UserValidate == true) { userloggedNode.InnerText = "true"; userEmailNode.InnerText = Email; if (Email == "*****@*****.**") { adminNode.InnerText = "true"; } //save xml xmlDoc.Save(Server.MapPath("ProductUpdate.xml")); Response.Redirect(Request.RawUrl); } else { Response.Write("<script>alert('Wrong Email and/or Password')</script>"); } } catch (Exception ex) { throw ex; } }