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

Blazor EditForm submit to browser POST endpoint

$
0
0

I have an EditForm as interactivity island in my old-style ASP.NET MVC application.

I want it to submit to usual POST endpoint, as old plain HTML form, with browser redirecting to result and such, but it not working (clicking a button will trigger a OnValidSubmit, but nothing happens).

I could write custom code that locates <form> tag in JS and sends it to server, but it seems very obscure way to do. I wonder if there is simple solution

<EditForm FormName="CreateProject" EditContext="@editContext" method="post" action="/game/create" OnValidSubmit="HandleValidSubmit"><FormHorizontal><DataAnnotationsValidator />    <ValidationSummary /><InputText @bind-Value="Model.ProjectName" class="form-control" /><FormRow><button type="submit" disabled="@formInvalid" /></FormRow></FormHorizontal></EditForm>

Viewing all articles
Browse latest Browse all 4839

Trending Articles



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