protected void btnLogin_Click(object sender, EventArgs e) { if (Page.IsValid) { Security.logIn(txtUsername.Text, txtPassword.Text); Boolean isLogggedIn = Security.isLoggedIn(); if (isLogggedIn) { checkLogin(); LinksControl control = new LinksControl(); control.reloadLinks(); Response.Redirect(Request.Path); } else { lblLoginMessage.Text = "Wrong Username or Password. Please Try Again."; } } }