|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Multiple onclick EventsHello!
I need an asp button to run multiple onclick events. First, it needs to run a piece of javascript. Next, it needs to run its own procedure (button_Click...). I may need to do other things. What is the best way to do this? Is there a way to call the onclick event more than once? Thank you! -Bahman Hi Again!
After reading mile-long documentation on how to do this, I did this: I created two controls; one aspnet and one regular html. I gave both the same name and hid the aspnet one. I wrote the onclick for the html in javascript and the onclick for the aspnet in c#. It works. It would be nice if the control was a bit more 'integrated'. Thank you! Happy Wednesday! -Bahman Show quoteHide quote "Bahman" wrote: > Hello! > > I need an asp button to run multiple onclick events. > > First, it needs to run a piece of javascript. > > Next, it needs to run its own procedure (button_Click...). > > I may need to do other things. > > What is the best way to do this? > > Is there a way to call the onclick event more than once? > > Thank you! > > -Bahman The button controls for asp.net 2.0 have a "OnClientClick" property, which
can be used for that purpose, I beleive. (I don't recall, offhand, if this was available in the previous versions of ..net). Doug Show quoteHide quote "Bahman" wrote: > Hi Again! > > After reading mile-long documentation on how to do this, I did this: > > I created two controls; one aspnet and one regular html. I gave both the > same name and hid the aspnet one. I wrote the onclick for the html in > javascript and the onclick for the aspnet in c#. > > It works. > > It would be nice if the control was a bit more 'integrated'. > > Thank you! Happy Wednesday! > > -Bahman > > "Bahman" wrote: > > > Hello! > > > > I need an asp button to run multiple onclick events. > > > > First, it needs to run a piece of javascript. > > > > Next, it needs to run its own procedure (button_Click...). > > > > I may need to do other things. > > > > What is the best way to do this? > > > > Is there a way to call the onclick event more than once? > > > > Thank you! > > > > -Bahman
Help with GridView Update w/ Object Data Source needed
XHTML 1.1 and DIV 1 pixel in height ViewState properties and mapped properties don't work well togethe How do I create a custom webcontrol that can have xml inside it's tag? cache and detailsview, all data controls problem Custom TreeNode for asp.net 2.0 treeview control Menu Control - Templates how to get changed text from web control textbox A bug? Transparent Dynamic Item! Calendar control to display image on Mondays |
|||||||||||||||||||||||