[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

a synchronization problem on webservice

wx

8/8/2003 3:52:00 AM

hi all, I have some problems on a Windows application in .Net Framework,just
as below:
private void button1_Click(object sender, System.EventArgs e)
{

WindowsApplication1.localhost.Service1 ser=new
WindowsApplication1.localhost.Service1();
textBox1.Text=ser.Add(int.Parse(textBox1.Text),1).ToString();
MessageBox.Show("ok");

}
you know, A webservice named ser is called in the above function,and ,when
the main form is loaded for the first time,if I click the button1 on the
form very quickly,the awful thing would happen:a messagebox is showed,when I
close it ,another messagebox is opened,I continue closing, and the same
thing happen:a messagebox is showed.The number of messageboxes is according
to the speed of my mouse clicking.

so, it seems the button1 still accept the click event while a webservice is
being called for the first time.But I expect only one messagebox would be
showed even though I click very quickly.How to control? hope your help!!!
Thank you!