Intersoft WebDesktop Documentation
How-to: Set ContentMode in WebCallOut
See Also Send Feedback
Intersoft WebDesktop > WebCallOut > Features > ContentMode > How-to: Set ContentMode in WebCallOut

Glossary Item Box

WebCallOut supports 2 mode of ContentMode, which are UseText and UseTemplate.

This topic shows how to set ContentMode in WebCallOut.

To set ContentMode in WebCallOut

  1. Right click on WebCallOut control and choose Properties.
  2. By default, ContentMode will be set to UseText. Set Text to WebCallOut's Text and Title to WebCallOut's Title.
  3. Set TargetControlId to the control you want to use, such as Label1. The WebCallOut will look like following:



  4. Now, Set ContentMode to UseTemplate.
  5. Right click on WebCallOut control and choose Edit Template >> WebCallOut Items.
  6. Drag ASP.NET TextBox and HTML button controls to the WebCallOut Items template.
  7. Named the HTML button as Submit and set TargetControlId to the control you want to use, such as Label2.
  8. Create a function called Button1_onclick().

    C# Copy Code
    function Button1_onclick() 
    {   
       var txt = document.getElementById("ctl00_content_WebCallOut2_WebCallOut2_C_TextBox1");   
       var lbl = document.getElementById("ctl00_content_Label2");    
       lbl.innerText = "Hello : " + txt.value;
    }
    

  9. Invoke the function in HTML button, such as:

    <input id="Button1" type="button" value="Submit" onclick="Button1_onclick()" />

  10. When you run the project, you need to enter your name in the WebCallOut.


  11. Click Submit and the inputted name will be displayed in the label.

          

See Also

Concepts
{ContentMode}

© 2012 Intersoft Solutions Corp. All Rights Reserved.