Home > Net >  Could you tell me the MVC how to make a choice of reading modules?
Could you tell me the MVC how to make a choice of reading modules?

Time:09-22

This is the view part of the code
@ model PagedList. IPagedList
@ using PagedList. Mvc;

@ foreach (var item in the Model)
{
Int ii=1;
@ Html. DisplayFor (modelItem=& gt; Item. ChoiseOnlyName)

@ Html. RadioButton (" [email protected] ", "A", false) a. @ Html. DisplayFor (modelItem=& gt; Item. QuestionOptionA)

@ Html. RadioButton (" [email protected] ", "B", false) b. @ Html. DisplayFor (modelItem=& gt; Item. QuestionOptionB)



}

Total @ Model. PageCount problem, the current first @ Model. The PageNumber topic
@ Html. PagedListPager (Model, page=& gt; Url. The Action (" ChoiseQuestion ", new {page}))



The question now is: everything in the title, before fill in the answer is no, that what should I do?
And each topic name value is different, the answers to these questions, how to submit to the controller?

CodePudding user response:

Background to define a save the answer list, and then click save the answer answer it,

CodePudding user response:

Use a Dictionary Store
The key deposit account
The value to store the answer list

CodePudding user response:

Through a user account, take out your list,

CodePudding user response:

Or, you can directly put the list in the session,
Subject is not too much, the problem is not big,
  • Related