【发布时间】:2023-03-14 13:33:01
【问题描述】:
我的项目基于 Asp.net Mvc 我遇到了在一个视图中显示多个模型数据但未在列表或网格视图中显示它应该以表单视图样式显示的问题 我有两个模态类 Product , BusinessCase
public class productViewModel
{
public string ProductTitle { get; set; }
public string Purpose { get; set; }
public string Composition { get; set; }
public string Requirment { get; set; }
}
业务案例视图模型
public class BcaseViewModel
{
public string ExecutiveSummary { get; set; }
public string Reason { get; set; }
public string ExpectedBenefits { get; set; }
public string DisBenefits { get; set; }
public string Cost { get; set; }
public string MajorRisks { get; set; }
}
我想在一个视图中显示这两个视图模型数据
public ActionResult PBView()
{
return View();
}
【问题讨论】:
标签: html razor model-view-controller view model