Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Employee {
- int EmployeeID {get;set;}
- string FirstName {get;set;}
- List<OfficeLocations> OfficeLocations {get;set;}
- }
- class OfficeLocations {
- int OfficeLocationsID {get;set;}
- //foreign key
- int EmployeeID {get;set;}
- string CityLocation {get;set;}
- string State {get;set;}
- }
- @model List<Project.Models.OfficeLocations>
- @for (int i = 0; i < Model.Count; i++) {
- @Html.EditorFor(m => m[i].Value1, new { htmlAttributes = new { @class = "my_editor" } })
- @Html.HiddenFor(m => m[i].OfficeLocationsID)
- @Html.HiddenFor(m => m[i].EmployeeID)
- }
- //extra editor box for adding a new value
- @Html.Editorfor(??????.Value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement