Created
March 14, 2016 08:15
-
-
Save cpoDesign/b9fd0b76fd15a0f57fee to your computer and use it in GitHub Desktop.
Model binding to the partial view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExamResultsFormViewModel | |
{ | |
public PreliminaryInformationViewModel PreliminaryInformation { get; set; } | |
public string MemberID { get; set; } | |
public string MemberName { get; set; } | |
public int PatientID { get; set; } | |
public string ConfirmationID { get; set; } | |
public bool IsEditable { get; set; } | |
#region Select Lists | |
public SelectList ProviderOptions { get; set; } | |
#endregion | |
} | |
public class PreliminaryInformationViewModel | |
{ | |
public string ProviderName { get; set; } | |
public string ProviderID { get; set; } | |
public string ServiceLocation { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Html.Partial("_YourPartialName", Model.Contact, new ViewDataDictionary() | |
{ | |
TemplateInfo = new TemplateInfo() | |
{ | |
HtmlFieldPrefix = "Contact" | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment