Hey Guys I need help on this, I know I can return List<string> in HTML.BeginForm which looks like this:
@using (Html.BeginForm("Test", "Home", FormMethod.Post, new {@class = "form-horizontal", role = "form"}))
{
<textarea name="logic" style="width: 10em; height: 10em;"></textarea>
<textarea name="logic" style="width: 10em; height: 10em;"></textarea>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-default" value="Register" />
</div>
</div>
}
I can return List<string> Logic on my Controller HTTPOST
But my question is how will I do it if I need to return a List of Object? Not using a Model because I need to return 2 Objects so I am was thinking like my controller should get it something like this
public ActionResult Test(List<Model1> model1, List<Model2> model2)
Thanks for those who can help
Model1andModel2?Model1andModel2are just examples, let say they have 2 parameters which arestring1andstring2for each Model if it will make it clearerforloop orEditorTemplate's for you model types and post back you view model.forloop and this one for using andEditorTemplate