1

I am getting the following Postback alert when I use the DotVVM <dot:Validator /> tags in my .dothtml pages. I cannot find any documentation on how to prevent this postback, control a timeout for it or control it's appearance. I am using the <dot:ValidationSummary /> tag at the bottom of my page and do not like the delay the Postback imposes. Any help would be appreciated.

Postback aborted because validation failed.

1 Answers1

0

This happens when DotVVM is in the debug mode. If you didn't have any validator in the page and there was a validation error, you wouldn't notice that - that's why DotVVM displays this popup.

To remove it, you need to set config.Debug = false in DotvvmStartup.cs. You can use the following construct to detect the debug mode based on your build configuration:

private bool IsDebug
{
    get 
    {
#if DEBUG
        return true;
#else
        return false;
#endif
    }
}
Tomáš Herceg
  • 1,595
  • 1
  • 13
  • 18