Intersoft WebCombo Documentation
How-to: Get/Set the TextBox value
See Also Send comments on this topic.
Intersoft WebCombo > WebCombo Features Overview > Client-side Programming How-to Topics > How-to: Get/Set the TextBox value

Glossary Item Box

You can get/set TextBox value on WebCombo via client side. The value inside the TextBox portion is NOT the WebCombo's Text (DataTextField).

In this topic, you will learn how to use GetTextBoxValue and SetTextBoxValue methods.

To get/set the TextBox on WebCombo

  1. Drag a WebCombo instance into the WebForm.
  2. Drag a HTML button and leave the Id as it is, which is Button1.
  3. To get TextBox value of combo, double click the HTML button and add the following code in the defined client side event handler:

    JavaScript Copy ImageCopy Code
    function Button1_onclick()
    {
       // Obtain WebCombo object
       var combo = ISGetObject("WebCombo1");
       
       // Obtains the value inside the TextBox
       // portion of the WebCombo
       combo.GetTextBoxValue();
       return true;
    }
    

  4. To set TextBox value of combo, double click the HTML button and add the following code in the defined client side event handler:

    JavaScript Copy ImageCopy Code
    function Button1_onclick()
    {
       // Obtain WebCombo object
       var combo = ISGetObject("WebCombo1");
       
       // Sets the value inside the TextBox
       // portion of the WebCombo
       combo.SetTextBoxValue("Please select the CustomerID");
       return true;
    }
    

  5. Run the project.

See Also