Hello there
I am very new to MVC
I have created a partial view as bellow
the controller
public class Pv_AddressController : BaseController
{
public ActionResult Index()
{
AddressModel model = new AddressModel();
return View(model);
}
public ActionResult GetAddress(string home, string postcode)
{
List< AddressModel> model = AddressUtility.FindAddressByPostcode(home, postcode,false);
return View(model);
}
view for Index as bellow
@model Account_Portal.Models.AddressModel
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>AddressModel</h4>
<hr />
<p>
@Html.Label("House Number or Name")
@Html.EditorFor(model => model.AddressLine1)
</p>
<p>
@Html.LabelFor(model => model.Postcode)
@Html.EditorFor(model => model.Postcode)
</p>
</div>
}
<div>
@Html.ActionLink("Continue", "GetAddress", new { home = Model.AddressLine1, postcode =Model.Postcode })
@Html.ActionLink("Don't Know the Postcode", "ManuallyEnter", new { type = "ManuallyAdd" })|
@Html.ActionLink("BFPO Customer", "ManuallyEnter", new { type = "BFPO" })
</div>
now I wanted is to include the partial view the AddressChangeController
the controller i have got is
public class AddressChangeController : Controller
{
public ActionResult Index()
{
ChangeAddressModel model = new ChangeAddressModel();
return View(model;
}
and the view is
@model AccountPortal.Models.ChangeBillingAddressModel
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryval")
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
//want to include the pv_addressController
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>
</body>
</html>
how do i include the pv_addressController in my main view
appreciate all your help