我有一个MVC视图,其中包含firstName,lastName,Address,City,State和Zip等联系信息字段。这些字段从2个搜索结果下拉列表中自动填充(lookupSLMRLeadRec()和lookupCRMLeadRec())。另外,我正在使用淘汰赛来进行这个MVC项目。
示例:对于Address1人口:
<div data-bind="visible: displayPhoneView">
<table>
<tr>
<td><strong>*Street<br />
Address:</strong></td>
<td>
@Html.TextBoxFor(model => model.vchAddress1,
new { data_bind = "value: lookupSLMRLeadRec().vchAddress",
@class = "form-control" })
</td>
</tr>
</table>
</div>
<div data-bind="visible: displayCRMView">
<table>
<tr>
<td><strong>*Street<br />
Address:</strong></td>
<td>
@Html.TextBoxFor(model => model.vchAddress1,
new { data_bind = "value: lookupCRMLeadRec().vchAddress",
@class = "form-control" })
</td>
</tr>
</table>
</div>
地址1未传递到模型视图,因为该字段根据两个条件进行填充。