Hi. I'm fairly new to MVC and admittedly don't fully understand how data is passed between Views and Controllers. That said, here is my issue.
I am working with C#. I have a page which has a list of items. Each item has a radio button set of three associated with it and there are 15 of these sets on the page. Thus I have radio1, radio2....radio15, etc. Each of these has value 0, 1, or 2 upon submit. I can't seem to understand how to get the information out of these radio button sets from the controller without passing 15 different variables to the post method in the controller which is associated with the view; ie passing Int32 radio1, Int32 radio2,.., Int32 radio15, etc.
I tried using ViewData["radio"+i] in a loop to access the value of each radio button set, but this, apparently can only be used to pass data to the View from the Controller and not the other way around.
Any advice is appreciated.
View Complete Post