Multiple onclick Events

B

Bahman

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
 
B

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
 
D

Doug Salomon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top