Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model Parent1
- @{
- ViewBag.Title = "Parent1";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @Html.Action("Child","MainControler")
- @model Parent2
- @{
- ViewBag.Title = "Parent2";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @Html.Action("Child","MainControler")
- public ActionResult parent1() //GET
- {
- Parent1Model model = new Parent1Model()
- return View(model );
- }
- public ActionResult parent2() //GET
- {
- Parent2Model model = new Parent2Model()
- return View(model );
- }
- public ActionResult Child() //GET
- {
- ChildModel model = new ChildModel()
- return View(model );
- }
- [HttpPost]
- public ActionResult Child(ChildModel model) //POST
- {
- DoThingsWithResult(model)
- // The next line should return the get of the parent action
- return RedirectToParent() // This does not exist...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement