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
 

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

Similar Threads

client vs server side 3
what am i doing wrong? 8
client side ? 6
validation 2
datagrid checkboxex #3 1
does page_load know 7
page_load 1
how to: 1

Back
Top