Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Kevin Gates
Kevin Gates
14,855 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
PLUS
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.