Open larkydoo opened 5 years ago
What do you mean when you say "set it from true to false"? Like, checking/unchecking the box in the browser?
Yes, that's what I mean. As an clearer example, I created a field IsOnDeansList in the Student class and updated the Create Razor Page to add it. When I used the standard tag helpers, I was able to set the value of the field to true. When I used Html.FormBlock I was not.
I'm attaching the pages I updated to make the example work:
Well that is odd. Definitely a bug!
I'm liking the HTML Helpers, but ran into an issue in using the Html.FormBlock to render input controls for a boolean value. The code that was rendered worked fine when setting the value from true to false, but did not work when setting it from false to true.
Here are my tags and what they rendered when IsActive is true:
@Html.FormBlock(m => m.Org.IsActive)
renderedrendered:
The differences seem to be
I'm not sure how I can work around this issue without just going back to using tag helpers for boolean fields. Any ideas would be appreciated.
Thanks!
Laurie