protected void btnSubmit_Click(object sender, EventArgs e) { try { if (txtName.Text == "Jaya" && txtPwd.Text == "1234") { Server.Transfer("Retailer.aspx"); } else { Server.Transfer("Login.aspx"); } } catch(Exception ex) { oExceptionManager.LogError(ex.Message, "Error From btn btnSubmit_Click in Login.aspx.cs"); } }
in my code the catch block is executing if it is true or false but i want to execute when i got false condtions pls modify my code