New to MVC–was never much of a front-end Web developer (mostly backend), so I'm not too privy to good design on the front-end. Now, I'm trying to use MVC without much original WebForm knowledge…that being said, please give me some pointers/links/good ideas on how to handle the following:
I have a textbox field that I want to show/hide based on a checkbox. I have these fields in my View @using (Html.BeginForm()…
Should I change the attribute on the text box in a javascript or controller action? If I use javascript, I'm having a hard time getting to the values in my beginform, but if I use controller action, I'm not sure how/what to pass to/from in my controller action.
Best Answer
I like using jQuery if I want to manipulate DOM.
Here the example -
View
Controller
Model
FYI: I suggest watch few videos training (free course at ASP.NET MVC 5 Fundamentals) or read a book or two before starting it. Otherwise, you will get frustrated.