Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

ExternalCallback on a DropDownList control

Last post 12-10-2009, 19:30 by jjrdk. 1 replies.
Sort Posts: Previous Next
  •  12-10-2009, 15:40 2902

    ExternalCallback on a DropDownList control

    Every example on ExternalCallback is on buttons that have the option to set <control>.OnClientClick porperty. But how do I set an external callback on a dropdownlist (When selected index changed) or on a Timer object?
  •  12-10-2009, 19:30 2903 in reply to 2902

    Re: ExternalCallback on a DropDownList control

    The buttons use the 'onclick' event to trigger their action. The dropdown list has an 'onchange' DOM event which you can use. If you are using an ASP.NET dropdown then remember to set AutoPostback to false.

    An idea here would be to use a script to generate the sent parameter, fx. extract the value of the currently selected item. You can tell the control that the passed parameter is a script by setting the isArgumentScript parameter to true. This means that the argument is rendered outside quotes and gets run every time the event is triggered.

View as RSS news feed in XML