重构"重命名"后,Visual Studio不会在aspx文件中重命名类。

时间:2014-10-15 06:47:38

标签: c# asp.net visual-studio visual-studio-2013

我在Visual Studio 2013中使用refactor->重命名重命名一个类。新名称是" ProductNew"。在弹出窗口中选择"在字符串中搜索"。然后VS在代码隐藏中重命名类名的每个外观,但在.aspx中不会更改旧名称Product:

<%-- Listing.aspx --%>
<asp:Repeater ItemType="SportsStore.Models.Product" SelectMethod="GetProducts" runat="server">
        <ItemTemplate>
            <div class="item">
                <h3><%# Item.Name %></h3>
                <%# Item.Description %>
                <h4><%# Item.Price.ToString("c") %></h4>
                <button name='add' type='submit' value='<%# Item.ProductID %>'>Add to Cart</button>
            </div>
        </ItemTemplate>
    </asp:Repeater>

如何在aspx中重命名类?感谢。

0 个答案:

没有答案
相关问题