jeudi 29 janvier 2015

How do I switch out a DropDownList with a CheckBox in asp.net mvc3?

I'm new to mvc and was wondering if there was a way to switch out a DropDownList with a CheckBox. In my database I've got a property with a datatype of bit. In Visual Studios, after I create my model and controller and run it, it shows up as a DropDownList with True and False. I'd like this to be just a Checkbox instead of a DropDownList for both the Index and the Create views. I also (obviously) need it to bind to the database after creating a new item. I'm sure there is a way to achieve this, I just haven't been able to find the answer. Thanks guys!





Aucun commentaire:

Enregistrer un commentaire