I know they always ask for code, but my question is basic. I also know that you can qualify it as "general knowledge" or "subjective response", but although it seems incredible, there are not many topics in Spanish that speak of the subject.
Basically I have an HTML Helper Checkbox and I want to capture its value with AJAX / JSON and send it to my controller so I can save it in the model.
Now the problem is that I do not know how to treat the checkbox because its value can be "on" or Nothing, when I want to capture that to take it to the BD the model requires me to make it "true" or "false" , so I do the conversion in the controller. Now the interesting thing is that when I see the BD I find that the possible values (bit) can be 0 or 1 and when I do the mapping instead of saving 1 (true) it saves me 0. Someone knows how to "convert" the data so that consider it as 1 or 0 in the BD? thanks !!