DotVVM Tip 08: Expressions in data-bindings are allowed


DotVVM Tips is a series of short articles showing interesting features of DotVVM. To learn more, visit our Docs site.

Building forms is really easy! Use the Visible property to show or hide forms fields based on values in other fields.

// DotVVM view
<dot:CheckBox Text="I want to receive newsletters"
              Checked="{value: Subscribe}" />

<dot:CheckBox Text="I want to be contacted with additional questions"
              Checked="{value: ResponseRequired}" />

<dot:TextBox placeholder="Enter your e-mail"
             Text="{value: EmailAddress}"
             Visible="{value: Subscribe || ResponseRequired}" />
Tomáš Herceg
Tomáš Herceg


I am the CEO of RIGANTI, small software development company located in Prague, Czech Republic.

I am a Microsoft Regional Director and Microsoft Most Valuable Professional.

I am the author of DotVVM, an open source .NET-based web framework which lets you build Line-of-Business applications easily and without writing thousands lines of Javascript code.

Ostatní články z kategorie: DotVVM Blog