Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. class Employee {
  2. int EmployeeID {get;set;}
  3. string FirstName {get;set;}
  4. List<OfficeLocations> OfficeLocations {get;set;}
  5. }
  6.  
  7. class OfficeLocations {
  8. int OfficeLocationsID {get;set;}
  9. //foreign key
  10. int EmployeeID {get;set;}
  11. string CityLocation {get;set;}
  12. string State {get;set;}
  13. }
  14.  
  15. @model List<Project.Models.OfficeLocations>
  16. @for (int i = 0; i < Model.Count; i++) {
  17. @Html.EditorFor(m => m[i].Value1, new { htmlAttributes = new { @class = "my_editor" } })
  18. @Html.HiddenFor(m => m[i].OfficeLocationsID)
  19. @Html.HiddenFor(m => m[i].EmployeeID)
  20. }
  21. //extra editor box for adding a new value
  22. @Html.Editorfor(??????.Value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement