Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have a scenario that I have to pass a list type argument from view to controller. Can anyone please help me in this.

Thanks & Regards,

R Mahesh
Posted
Comments
Sergey Alexandrovich Kryukov 18-Jan-12 21:04pm    
Well, and why it seems to be a problem?
--SA

1 solution

Your view should implement the type of list you want to pass from the view to the controller.

for example:
C#
@model ICollection<mynamespace.models.thing> 


now I'm not an expert and I don't know if this is the best way to do it , but it works for me and it kinda makes sens too.

Note that I'm using razor views not aspx.
 
Share this answer
 
v2

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