Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

bool return value problem

$
0
0

Hi

my code

bool user_check

private void btnsignin_Click(object sender, RoutedEventArgs e)
{

WCFServiceLibrary.LibrayClient check_user = new WCFServiceLibrary.LibrayClient();
check_user.check_user_nameAsync(txtusername.Text);
check_user.check_user_nameCompleted += new EventHandler<WCFServiceLibrary.check_user_nameCompletedEventArgs>(getbool_user);

if (user_check == true)
{
MessageBox.Show("hi");
}

}

void getbool_user(object n, WCFServiceLibrary.check_user_nameCompletedEventArgs e)
{
user_check = e.Result;
}

my code is correct. But there is one problem

To get the return value i have to click 2 times of submit button

how to solve it

Thanks in advance


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>