Aspnetcore: Page reload after onClick - if button inside <form> tag

Created on 5 Dec 2018  路  3Comments  路  Source: dotnet/aspnetcore

area-blazor

Most helpful comment

If you need the form tag in any way. Just make the button <button type="button" ></button> to signify it that it's not a submit button.

All 3 comments

If you use the Form tag, your page will be submitted to the server. Just remove it. You don't need it, except you want to submit your form to the server this way. Normally you don't.

If you need the form tag in any way. Just make the button <button type="button" ></button> to signify it that it's not a submit button.

@michaelvolz , @RyoukoKonpaku Thank you!
It's working now!

Was this page helpful?
0 / 5 - 0 ratings