My Index action method returns a View that shows a list of QuestionViewModel objects. Each QuestionViewModel object has a Question_Type property:
public Question_Type Question_Type { get; set; }
When a user pushes the edit button, i would like to return different Views based on that Question Type. For instance, if a Question is of type “Multiple Choice”, i would like to return a View that uses:
@model EditMCQQuestionViewModel
and if the question is of type “Matrix” i would like to return a View that uses
@model EditMatrixQuestionViewModel
is this possible through a single action method?
You can pass in the view name
you may beable to use the same view, just pass in different viewmodel.