How do i find all references to a user control
Asked Answered
A

2

2

in Visual Studio 2010 I have a really big ASP.NET website project which has a bunch of user controls.

How do I determine all the .aspx pages where a specific .ascx user control is referenced throughout the project.

Thanks

Anarchist answered 13/4, 2012 at 16:0 Comment(0)
A
1

Right click the class of your User Control and Select the below option.

Find All Reference

enter image description here

Aurilia answered 13/4, 2012 at 16:6 Comment(3)
Will this work with user controls in markup? I thought it would only search code.Evolve
It will Search the Code Behind and Designer file and Once you have got it in your designer. Than obviously it is in your mark up as well.Aurilia
Search window may also search the Similar Keywords from .js file. But it is about only correct ReferenceAurilia
W
1

The simplest way I can think of is to just use the Find In Files (Ctrl/Shift-F) search dialog.

Find what: name of user control

Look in: Entire project

Woollen answered 13/4, 2012 at 16:3 Comment(1)
This should also work for searching similar keywords. But Reference will only produce accurate results.Aurilia
A
1

Right click the class of your User Control and Select the below option.

Find All Reference

enter image description here

Aurilia answered 13/4, 2012 at 16:6 Comment(3)
Will this work with user controls in markup? I thought it would only search code.Evolve
It will Search the Code Behind and Designer file and Once you have got it in your designer. Than obviously it is in your mark up as well.Aurilia
Search window may also search the Similar Keywords from .js file. But it is about only correct ReferenceAurilia

© 2022 - 2024 — McMap. All rights reserved.