Find references of a partial view in MVC?
[5.1.1757]
Is there any way I can find usages of a partial view (*.ascx) with RS/VStudio2010 ?
I.e. going from Foo.ascx => FooPage.aspx
where the aspx contains e.g. <% Html.RenderPartial("Foo", SomeModel); %> ?
I've tried adding ClassName="Foo" at the top but then RS tells me "class 'Foo' is never used".
Thanks.
Please sign in to leave a comment.
Put focus on file Foo.ascx in solution explorer, then Find Usages - you will be presented with all foo.ascx usings.
Another way - put cursor on Foo using in FooPage.aspx (on Foo string in Html.RenderPartial("Foo", SomeModel)) call) and again, Find Usages.
Great, thanks.