protected void btnLogin_Click(object sender, EventArgs e) { //instantiate the service FanServiceReference.FanRegisterLoginServiceClient frlsc = new FanServiceReference.FanRegisterLoginServiceClient(); //call the method int key = frlsc.FanLogin(txtFanLoginPasswordPlain.Text, txtFanLoginUserName.Text); //check results if (key != 0) { Session["FanKey"] = key; lblResult.Text = "You have successfully logged in"; } else { lblResult.Text = "Login failed, please try again"; } }