Hi,
I see. The most common reason is that you hooked up your event handler multiple times. For example, the following code will cause Button1_Click to be called twice when the button is clicked:
Code: C#
//The following code hook up Click event hanlder twice. So
//Button1_Click will be called twice when the button is clicked
Button1.Click += new EventHandler(Button1_Click);
Button1.Click += new EventHandler(Button1_Click);
There are many ways to hook up an event handler. The above code shows one way. If you use VB.NET, then you can also hook it up this way:
Code: Visual Basic.NET
Private Sub Button1_Tick(sender As Object, e As EventArgs) _
Handles Button1.Click
'your event handling code
.....
End Sub
With ASP.NET, you can also hook it up directly in your ASPX, for example:
Code: HTML/ASPX
<asp:Button OnClick="Button1_Click" ....>
They all count. So for example, if you have OnClick="Button1_Click" in your ASPX and Handles Button1.Click in your .VB at the same time, then it will be called twice.
Hope this clears up.
Thanks