I have a model as order inside it I have a another object which I am trying to use in @Html.Partial Code snippet
public class Order{
public string Id{set;get;}
public Address BillingAdress{set;get;}
public Address ShippingAddress{set;get;}
}
public class Address{
public int Id{set;get;}
public string Address{set;get;}
}
IN VIEW
@model Order
OrderId:
@Html.TextBoxFor(x=>Model.Id)
ShippingAdress:
@Html.Partial("Adress", Model.ShippingAdress)
BillingAddress:
@Html.Partial("Adress", Model.BillingAdress)
this is not working . but when I am passing Model instead of Model.ShippingAdress and Model.BillingAdress, TryUpdateModel(Order) is working in controller action can any one tell me why?? I have searched in net but not got any concreete solution so please help me?