Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,

Let me first say, I'm not an experienced MVC developer. :)

What I want to do is to show my model in a view by looping out each object in a table(this I can do :) ). On the right side of each row, i.e an new column, I want a checkbox to make it possible for the user to confirm that the data in the row is correct. The user should the be able to click on a button that sends each "checked" row back to the server where the rowId is sent to another database table called "Checked".

My question is, how should I pass this back to the server? Should pass a formcollection and then iterate through each row in some way and get the rowId? Should I use a viewmodel and pass the model back to the server? I guess that's the best option...but how would a viewmodel like that look like? I've only used viewmodels for like creating a new user, and this is not like that.

Correction: I guess what I want to know is how to use the default view template "Edit" with IEnumerable?

Thanks
Erik
Posted
Updated 2-Feb-12 2:52am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900