0
muli353
8y

you guys know any free advanced MVC project tutorial video available? I would appreciate it because my ActionResult methods are becoming more complicated to manage based on params... thanks

Comments
  • 0
    Are you passing viewmodels?Many devs use them as a container for things that need passed to and from the view. They don't seem to show this method in tutorials. I have some examples on my github and there was a good example on youtube. If interested I will send you the links.
  • 0
    Yes @georgelynch I use viewModels but I have one case with checkboxes in a <table> tag. I use Jquery UI for modal dialog for choosing some data and then handle that operation for all checked items - seems a problem to handle that kind of stuff in mvc, why is it that complicated?
  • 1
    @muli353 You are right checkboxes are tricky. If I only have a few checkboxes I create a Boolean property that I pass in with the view model. Then I can have user input set it and pass the value to the action. If I have a collection of Booleans that is part of something I am looping through I give the element a unique Id so I can address the selected items with javascript. I have also used Ajax to post the changes directly to the action.
Add Comment