I'm fairly new to C#, and am creating my first MVC project, and am having a hard time figuring out the methodology of passing 3 parameters of varying types to a controller action. Here is my controller method:
public ActionResult Create(Notification notification, string hash, list<int> users){
//code inside method irrelevant...
}
and my Notification model:
public class Notification
{
public int ID { get; set; }
public string ApplicationID { get; set; }
public string Description { get; set; }
public System.DateTime DateStamp { get; set; }
}
Before I added the List<> parameter it worked fine by having the posted data (or querystring) like so:
ApplicationID=1&Description=yo&hash=abcdefg
And it magically knew that the two parameters ('ApplicationID' and 'Description') belonged to the notification object. But now I'd like to add in a list<> of ints.
Is this something that can be done and how would you format the data/querystring passed?