How to gather arbitrary length list data in ASP.NET MVC.
Posted
by C. Ross
on Stack Overflow
See other posts from Stack Overflow
or by C. Ross
Published on 2010-03-12T13:19:22Z
Indexed on
2010/03/12
13:27 UTC
Read the original article
Hit count: 174
asp.net-mvc
|asp.net-mvc-controller
I need to gather a list of items associated with another item from my user in a ASP.NET MVC project. I would like to have a controller action like bellow.
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(int x, int y, IEnumerable<int> zKeys)
{
//Do stuff here
}
How can I setup my form to pass data in this way? If data of this particular form can't be provided, what's the next best way to pass this type of information in ASP.NET MVC?
© Stack Overflow or respective owner