Topic: Checkbox is AWOL in ASP.NET MVC when using CheckBoxFor due to hidden input.
Ryan Ternier
asked 10 years ago
howie418
pro answered 9 years ago
brijesh@njit.edu commented 7 years ago
this solution worked for me, thanks.
I wish MDB should have fixed it by now.
TyronSmith pro premium priority commented 7 years ago
Thank you, this works great!
Bartłomiej Malanowski
staff pro premium answered 10 years ago
Ryan Ternier
answered 10 years ago
Ryan Ternier
answered 10 years ago
Bartłomiej Malanowski
staff pro premium answered 10 years ago
howie418
pro answered 9 years ago
Bartłomiej Malanowski
staff pro premium answered 9 years ago
Multinerd
answered 8 years ago
It appears this has not been fixed yet. in MDB 4.5.0 and the js provided above does not work.
Heres a 'MvcHtmlString ' extension im using the works
https://gist.github.com/multinerd/21debdc7a9278049c82ae8078e1b148b
just replace
@Html.CheckBoxFor(m => m.RememberMe, new { @class = "form-control validate", id = "loginform-rememberme" })
with
@Html.BasicCheckBoxFor(m => m.RememberMe, new { @class = "form-control validate", id = "loginform-rememberme" })
rhubka
answered 8 years ago
using System; using System.Web.Mvc; using System.Linq.Expressions; using System.Web.Mvc.Html;
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- User: Free
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No