protected void ButtonLogIn_Click(object sender, EventArgs e) { var client = new AuthServiceClient(); var adminModel = new AdminModel { AdminUserName = TextBoxLoginUsername.Text, AdminPassword = TextBoxLoginPassword.Text }; bool result = Convert.ToBoolean(client.AuthenticateAdmin(adminModel)); if (result) { Session["AdminUser"] = "******" + TextBoxLoginUsername.Text; Response.Redirect("AddCarPage.aspx"); } else { MessageBox.Show("Please provide a valid username and password"); } }