mvc:如果property1为null,我想从property1或property2设置textBox值

时间:2015-09-08 07:50:29

标签: asp.net-mvc

我想做这样的事情:

@Html.TextBoxFor(model => model.PackagePrice.MotherCompanyPercentage??model.DefaultMotherCompanyRevenuePercentage , new {id = "txtMotherCompanyPercentage", type = "number" , Class = "form-control"})

0 个答案:

没有答案