472,139 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

ASP.NET events firing twice

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
Jul 21 '05 #1
2 1569
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

"Kory Pukash" <pu*****@idhw.state.id.us> wrote in message
news:00****************************@phx.gbl...
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

Jul 21 '05 #2
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
-----Original Message-----
I have an asp.net(2003) form that uses web server controlsevent 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, butthe variable is reset between the PageLoad events. It is
actually processing the events on two separate threads andI 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 sectionthat binds the events to the code blocks is not
duplicated.

Help if you can!

Kory Pukash
MCSD, MCT
.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mike | last post: by
2 posts views Thread by Kory Pukash | last post: by
5 posts views Thread by Paal Berggreen | last post: by
20 posts views Thread by David Levine | last post: by
reply views Thread by tshad | last post: by
4 posts views Thread by Marc Solé | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.