Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Kevin Gates
Kevin Gates
15,053 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.