client and server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

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

thanks,
rodchar
 
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
 
Back
Top