DotVVM - IncludeInPage displayed for a split of second during page load

75 Views Asked by At

When I use IncludeInPage property of DotVVM control, this control is rendered for a split of second during page load. Include in page contains value binding and while it is not evaluted this control is displayed I guess. This is quite disturbing. How can I prevent it?

Control example:

<div IncludeInPage="{value: Gender == Gender.Male}">
     This text should not be displayed at all.
</div>
1

There are 1 best solutions below

0
Miroslav Adamec On

Workaround: If you want to hide/show the content staticly and need to show/hide it until reload of page, use resource binding.

<div IncludeInPage="{resource: Gender == Gender.Male}">
     This text should not be displayed at all.
</div>

This does not apply to situation when you want to show/hide content later dynamically.