WebCallOut is tightly integrated with WebCombo and WebInput.
This topic will show you how to integrate WebCallOut with WebCombo and WebInput.
To integrate with WebCombo and WebInput
- Drag WebCallOut and WebInput controls to the WebForm. Named WebInput as WebInput1.
- Right-click on WebCallOut control and choose Properties.
- Set ContentMode to UseTemplate and TargetControlId
to WebInput1.
- Right-click on WebCallOut control and choose Edit Template >> WebCallOut
Items.
- Drag WebInput, WebCombo and ASP.NET Button controls to the content template. Named
WebInput as WebInput2.
- Bind WebCombo
to AccessDataSource control (Use Customers table and bind City to WebCombo).
- Right-click on WebCallOut control and choose End Template Editing
to apply the settings.
- Use OnClick client side event to integrate WebCallOut with WebCombo
and WebInput.
function Button1_onclick()
{
var wiAddress = ISGetObject("WebInput2");
var wcCity = ISGetObject("WebCombo1");
var wiResidence = ISGetObject("WebInput1");
var webCallOut = ISGetObject("WebCallOut1");
var residence = wiAddress.GetValueData() + " , " + wcCity.Text;
wiResidence.SetValueData(residence);
webCallOut.Hide();
}
|
- Trigger Button2_onclick() function in Button1's onclick
event.
<input id="Button2" type="button" value="Button" onclick="return Button2_onclick()"
/>
- Run the project. When you hover the mouse to WebInput1, WebCallOut will appear along
with WebInput and WebCombo in it. Fill the address in WebInput and select a city
from WebCombo. Finally, click the button to send the information provided into
WebInput1.