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

Problem when submitting EditForm after refreshing the browser

$
0
0

I have Blazor Web app with render mode InteractiveAuto.I have one Editform to validate the information from one table in database. After validating, It return some data to another Editform and some additional frields on it. Both Editform run as expected untill browser is refreshed. After F5, first EditForm gives error in await httpClient.GetAsync() as bad request. It does not even go to controller. After inspecting I see method=post is missing from after refresh so I added it:

<EditForm method="post" Model="@Model" OnValidSubmit="VerifyStudent"> </EditForm>

It did not work.Tried override OnParametersSetAsync. It did not work.

protected override async Task OnParametersSetAsync() {     Model = new(); }

Also, I noticed after browser refresh autofill form does not show suggestions, if that makes any difference.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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