Find references of a partial view in MVC?


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".

Comment actions Permalink

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.


Please sign in to leave a comment.