Read FluentCheckbox via minimal API with context.Request.Form not working? #3144
Replies: 2 comments
-
Hi, This is not really an issue but more a discussion item. Ill move it there. To answer your question, a |
Beta Was this translation helpful? Give feedback.
-
hi @vnbaaij I know that Binding here in FluentUI Blazor is of type bool, but I don't see how the FluentUI blazor example relates to my problem? The example is a FluentUI blazor form My problem is about an HTML form: So the question is simple: How to read the sent FluentCheckbox value in the controller/minimal API (ASP.NET)? Thank you |
Beta Was this translation helpful? Give feedback.
-
Hi Fluent-Team,
In my Blazor Web (Server) app I have implemented a login via HTML form
<form id=”LoginForm“ action=”login“ method=”post“>
This also contains a checkbox for registration
<FluentCheckbox Name=”registerCheckbox” @bind-Value=“@registration” />
In my minimal API, I then read the form values via
With username and password this works without problems, with context.Request.Form[”registerCheckbox“] I get nothing (the value is empty (”").
If I use pure HTML checkbox with:
<input type="checkbox" id="registerCheckbox2" name="registerCheckbox2" @bind="registration" />
then I get the expected value “on”
I assume that I am not using the checkbox in my HTML form correctly here with
<FluentCheckbox Name=”registerCheckbox” @bind-Value=“@registration” />
or is the problem somewhere else?
Thank you in advance for any help.
🌍 Your Environment
Windows 11
Chrome
NET 9
Beta Was this translation helpful? Give feedback.
All reactions