Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

blazor editform and submit buttons with an @onclick

$
0
0

In my Blazor Webassembly app, I have an EditForm with two submit buttons.

Each of the submit buttons has an @onclick handler which just sets a model value so I can tell which button was pressed.

This works fine under .Net 6 and 7, the value is set and validation and submit processing proceed as usual.

Under .Net 8, the @onclick hander is called, but validation and submit do not.

Any suggestions?

I have also tried calling EditForm.EditContext.Validate in my @onclick handlers. this returns false when there are validation errors (as expected) but no error messages are displayed.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>