When I add this simple part to a repeater control, all is good, no compilation error:
<PostBack.Handlers>
<dot:ConfirmPostBackHandler Message="Do you really want to submit the form?" />
</PostBack.Handlers>
But adding the same to a <dot:Button>
, as shown in many examples, I get the error:
DotVVM.Framework.Compilation.DotvvmCompilationException: Content control must inherit from DotvvmControl, but DotVVM.Framework.Controls.ConfirmPostBackHandler doesn’t.
Do I miss something?!
Here is the full button control code I use in the page:
<dot:Button ButtonTagName="button" class="btn btn-icon p-0"
title="{resource: SomeStringProperty}"
IncludeInPage="{resource: SomeBooleanProperty}"
Click="{command: SomeCommand()}">
<ItemTemplate>
<i class="flag flag-country-ch"></i>
</ItemTemplate>
<PostBack.Handlers>
<dot:ConfirmPostBackHandler Message="Do you really want to submit the form?" />
</PostBack.Handlers>
</dot:Button>
Best regards