what's causing you to come to the event twice?
Is the user clicking the button twice in a row?
or after post back is the user clicking the button again and you want to
prevent this?
or is the event triggering twice for one button click/
some more details please
I general ASP.NET practive you need to create mechanisms for persistance.
So, if you create a boolean to remember if the event is run,
you'll have to create a mechanism for this boolean value to be remember to
subsequent posts or amongst other pages.
Here are some methods you can use
1) Viewstate your variable
2) Session your variable
3) set an control on your pages value to remember your variable
4) Store this in a database
5) store this in a cookie
you can also look at disabling the button, or setting it to invisible
Good luck, HTH
"Aleks Kleyn" <Al*********@MailAps.orgwrote in message
news:00**********************************@microsof t.com...
In asp.net I can put code for button click event. However I come to this
event twice. What is the reason and how to prevent or check second entry
to this event. I need to make sure that i do not run the same code twice.
Aleks Kleyn