client and server

G

Guest

hey all,

can you run a client-side script and a server-side script for a single button?

thanks,
rodchar
 
K

Karl Seguin

Sure, the client-side script will run, the postback will intiate as normal,
and your server-side event handler will fire.

To do so, simply do myButton.Attributes.Add("onClick",
"ClientSideFunction();")

you have to do it this way, 'cuz by default onClick is for the server-side
event.

The Button class in ASP.Net 2.0 features a OnClientClick property.

Karl
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top