private void cmdOK_Click(object sender, EventArgs e) { Server.Service1 server = new Server.Service1(); bool reset; bool resetPassed; server.reset(txtUsername.Text, txtPassword1.Text, txtConfirmpassword.Text, out reset, out resetPassed); if (reset) { MessageBox.Show("Password match and reset "); } else { MessageBox.Show("user not found or password and confirm password mismatch"); } }