Rename in MVC Views

When I rename a class w in VS 2008 it doesn't carry this through to any templates that references it e.g. given

public class CategoryModel

{

      public int Id { get; set; }

      public string Name { get; set; }

}

and

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CategoryModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Category
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>Category (<%= Html.ActionLink("Edit", "Edit", new { id = Model.Id }, null)%>)</legend>
        <%= Html.DisplayForModel() %>
    </fieldset>
</asp:Content>

If I rename CategoryModel to ProductCategoryModel, then the reference in the Inherits does not get updated

1 comment
Comment actions Permalink

Hello Paul,

I wasn't able to reproduce this behavior with ReSharper 5.1 (build #1721).
Which version/build of ReSharper are you using? Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

When I rename a class w in VS 2008 it doesn't carry this through to
any templates that references it e.g. given

public class CategoryModel
{
public int Id { get; set; }
public string Name { get; set; }
}
and

<%@ Page Title="" Language="C#"
MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<CategoryModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent"
runat="server">
Category
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent"
runat="server">
<fieldset>
<legend>Category (<%= Html.ActionLink("Edit", "Edit", new { id
= Model.Id }, null)%>)</legend>
<%= Html.DisplayForModel() %>
</fieldset>
</asp:Content>
If I rename CategoryModel to ProductCategoryModel, then the reference
in the Inherits does not get updated

---
Original message URL:
http://devnet.jetbrains.net/message/5266813#5266813



0

Please sign in to leave a comment.