Client Script for server controls..

  • Thread starter Thread starter Jerry Camel
  • Start date Start date
J

Jerry Camel

Is there a way to have a server control run client side script? Seems if I
try to set an onSelectedIndexChanged event handler for an ASP dropDownList,
it won't compile. Is there a way to have some event strigger client side
script and some trigger server code? Thanks.

Jerry
 
Let's say the name of your drop-down list is myCombo:

myCombo.Attributes.Add("onchange", "myFunction();");

where "myFunction" is the name of your client side event handler

-Raul
 
Back
Top