Index.cshtml
@model Shell.OGEAP.FacilityManager.WebUI.Models.FacilityViewModel
<div id="hiddenDiv" style="display: none">
@Html.Partial("FacilitGrid", Model)
</div>
FacilitGrid.cshtml部分视图
<div id="hiddendiv2" style="display: none">
test
@Html.Partial("ViewFacility", (Shell.OGEAP.FacilityManager.WebUI.Models.FacilityViewModel)Model)
ViewFacility.cshtml
@model Shell.OGEAP.FacilityManager.WebUI.Models.FacilityViewModel
@Html.DisplayFor(modelItem => modelItem.FacilityTypeName)
来自FacilitGrid.cshtml ..我正在向控制器发送ajax请求:
Ext.Ajax.request({
url: 'facility/Load3',
timeout: 6000000,
params: {
newParentNodeID: bookId
},
success: function (response) {
result = response.responseText;
alert('suc' + result);
},
failure: function () {
alert(' details not found.');
}
});
我可以在html响应中看到模型的属性值,但是它没有使用html.displayfor在viewfacility.cshtml中显示。