asp.net - Is it possible to pass my model which I used in a view back to my controller in MVC3? -
in questionmodel have:
private list<questionmodel> _questionlist = new list<questionmodel>(); which use in view:
//getquestionlist returns _questionlist foreach (var item in model.getquestionlist()){...} i want acces model in controller when submit form in view.
have tried add model parameter in de controller function like:
public actionresult savedata(questionmodel model){} but nothing in question is, possible , how it?
you need bind type of model , use for loop not for each loop in view.
Comments
Post a Comment