C# ASP.NET MVC Forms Creating a Basic Form Working with Non-String Data

Kevin Gates
Kevin Gates
14,817 Points

MVC will omit posting a boolean back to a field...no longer true in Visual Studio 2017

It appears in Visual Studio 2017, around minute 4:22 of the video, that boolean values are not posted back into the field.

It still happens for me and I'm using Visual Studio 2019 — possibly there were other factors at play causing it to not occur in your environment?

1 Answer

Radu - Adrian Buha
Radu - Adrian Buha
Courses Plus Student 5,535 Points

Nope. If you put "True" in the "Exclude" field, after pressing the "Continue" button in the Visual Studio 2017, I get "value" in the "Exclude" field, but if you put "False" and then press "Continue", the field will be empty.

Windows 7 here with Visual Studio 2017.