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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -