If I am using model binding and one of the variables in the model is a bool what string must the form collection contain to be considered true or false?
So for example if my model has a variable:
bool isHappy;
Now when the model binder reads the form collection and it contains name "isHappy" what will the value have to be? "true", "checked", "1", etc?
It will be "true" or "false". Note that it's case insensitive so "True", "False", "TRUE", "FALSE" also work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With