ASP.NET events firing twice

  • Thread starter Thread starter Kory Pukash
  • Start date Start date
K

Kory Pukash

I have an asp.net(2003) form that uses web server controls
event architecture. The form has edit, cancel, save,
delete buttons on it. When the delete button is clicked
the following events fire.

PageLoad
btnDelete_Click
PageLoad
btnDelete_Click

One of the other buttons executes it's code twice as well,
but I am able to work around it. I can't work around the
delete issue since the id of the record to be deleted
remains within the document. I tried using a variable, but
the variable is reset between the PageLoad events. It is
actually processing the events on two separate threads and
I am not sure why.

AutoEventWireup is set to false for the page as I have
seen a few articles on the web that discuss that issue.

Also, I have verified that the InitializeComponent section
that binds the events to the code blocks is not
duplicated.

Help if you can!

Kory Pukash
MCSD, MCT
 
I believe if you make a simple Asp.Net application with a page having
several buttons, and a Delete button will not fire events twice. So there
are must be something special in your architecture or code. Check them.

-jl
 
One of our UI developers has also experienced this
problem. In his case the control in question was in a user
control and the double button click occurred on a login
page. The problem started appearing just after we upgraded
to 1.1 and the VS.NET 2003. I think it might be a known
bug, but he was able to work around it.

Hope This Helps,
Chris
 
Back
Top