You can get the text and value of multiple selection WebCombo using GetMultipleValuesText and GetMultipleValuesValue methods.
In this topic, you will learn how to implement those methods.
To get the text and value of multiple selection using client side API
- Drag a WebCombo instance into the WebForm.
- Drag a HTML button and leave the Id as it is, which is Button1.
- To get the text of multiple selection combo, double click the HTML button and add the following code in the defined client side event handler:
JavaScript Copy Code function Button1_onclick() { var combo = ISGetObject("WebCombo1"); alert(combo.GetMultipleValuesText()); return true; }
- To get the value of multiple selection combo, double click the HTML button and add the following code in the defined client side event handler:
JavaScript Copy Code function Button1_onclick() { var combo = ISGetObject("WebCombo1"); alert(combo.GetMultipleValuesValue()); return true; }
- Run the project.