I have a partial view that I would like to use on 2 different striped-typed scenes. The data being passed is just a simple ID integer, but when I try to present the data on # 2, then I
the model item type in the dictionary
CMESurvey .ViewModels.SurveyParticipantViewModel , but this dictionary requires a model objectCMESurvey.Models.SurveyProgramModel .Here is a partial view code that errors:
@ Html.Partial ("SurveyProgramSubNav", new {ProgramId = Model.ProgramId})This code is typed differently with a partial view Strong type:
@ Model CMESurvey.Models.SurveyProgramModelFor partial view, and:
@ Model CME Shrine. View Models. See survey paperspaceModelAny help is appreciated for the view that I am having trouble.
I think you want:
@ Html Partial ("SurveyProgramSubNav", new survey programmodel {ProgramID = Model.ProgramId})Specify the strong type of model instead of automatic type.
Comments
Post a Comment