Good day,
I am creating an ASP.Net site with MVC 5 and Razor views. I have a Parent class and a Child class, so that a Parent can have multiple Children. I am using EF Code first and have my 2 models with my DB context in the Models folder in my project. I have created scaffolded items for both.
What I have done is on the details of a Parent, I have a list of children, using a _Partial view. What I would like to do is from the Parent details, if you click on a 'New Child' Action Link, the Create for Child is displayed with the ParentId already selected and not editable.
What woukd be the best way to implement this? Would I need to pass the data along to the controller or in ViewBag? I do not know the correct term is for this type of layout/functionality (Master-Detail view?).
I have also been on the ASP.net site, but cannot find what I am looking for.