【发布时间】:2015-07-02 19:16:09
【问题描述】:
我想做一个销售模块。
我想知道使用多个局部视图是否是好的做法。
例如:
<div id="mypage">
<div id="select_account">
@*
here the code for select an account or call a partial view?
*@
</div>
<div id="select_product">
</div>
<div id="mydetails">
@*
what is better? use the code for details here? or added them on a partial view?
*@
</div>
<div id="showingtotals">
@*
here its shows the iva, subtotal and total then the same question
partialview? or on this page?
*@
</div>
</div>
在说之后,例如当我添加一个产品时,我需要进行 2 次调用
第一个更新详细信息div,第二个更新总数div,然后它会降低我的系统速度。
我的主要问题... 我应该使用很多局部视图吗? 还是使用最少的局部视图更好? 在这个简单的示例中,有 4 个部分视图(用于选择客户、选择产品、显示详细信息和显示总计) (可能还有其他用于接收付款)
【问题讨论】:
标签: html asp.net-mvc asp.net-mvc-4 asp.net-mvc-partialview