hello
i have a main page that contains 3 partial views.i have a page that contains 3 partial views.
i have 5 table in data base.and some of them have relation.some fields of these table should be filled in partial ONE,some should be filled in partial TWO,and ... i make a class of combination this 5 table.
//View Models:
public class PartialViewModel1
{
[Display(Name = "Name")]
public String Name { get; set; }
public String LName { get; set; }
public String address { get; set; }
}
public class PartialViewModel2
{
public int id { get; set; }
}
public class PartialViewModel3
{
public DateTime DOB { get; set; }
}
[HttpGet]
public PartialViewResult PartialView1()
{
return PartialView(new PartialViewModel1());
}
[HttpGet]
public PartialViewResult PartialView2()
{
return PartialView(new PartialViewModel2());
}
[HttpGet]
public PartialViewResult PartialView3()
{
return PartialView(new PartialViewModel3());
}
@Html.Action(PartialView1,Account)
@Html.Action(PartialView2, Account)
@Html.Action(PartialView3,Account)
i' ll pass
@model Practise.Controllers.PartialViewModel1
or
@model Practise.Controllers.PartialViewModel2
or
@model Practise.Controllers.PartialViewModel3
to my PartialViews.
i should pass any Models to my Main View(Main Page) ? and how can i send result of partial One to Two?
in fact i wanna fill three partialviews step by step .and send result of partial 1 to 2 . and end of partial 3, whole filled propertise should be send to my main page. please help