IWML supports advanced data binding. Using data binding you can bind any value to other values, data, functions, or even properties in code. Data binding also supports REST which will be covered later.
Property Data Binding
Markdown can use data binding, but for now we will introduce non markdown based data binding. To data bind a property, use the = prefix:
<property name>: =<data binding expression>
In this example we simply bind the .Text property of a Text control to the .Text value of an edit.
- Click show
- Change the value in the Edit.
- Click the OK Button.
The value is updated because although we have not assigned any code to the button, the Button’s click event is still processed by IntraWeb.
This is a one way binding, but two way data binding and formatting are also options for data binding.