Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
I am working on asp.net website, having large number of user controls(ascx) and webforms(aspx). I am facing problem while I need to find references of any specific user control (where it is used in another controls or other webforms).

By Right click on user control's class name, and click on Find All References only finds the references that used in .cs files, it did not find the control's usage in aspx or ascx files.

Can any body suggest is there any way to find the usage of my control. or visual studio does not support any such functionality yet.

[edit]Spurious code block removed - OriginalGriff[/edit]
Posted
Updated 25-Apr-12 21:04pm
v2

Use find in files search (Ctrl-Shift-F) in Visual studio. Enter your control name and find...you will get list of files which contains control.
 
Share this answer
 
Comments
Reza Ahmadi 26-Apr-12 5:20am    
5!
Muhammad Idrees GS 28-Apr-12 5:03am    
Hi adkalavadia,


Thanks for your suggestion. But the problem with this technique is that it also finds out all the content that is even commented and of no-use. Although that is garbage commented code placed there, but I have to put lots of effort in order to get rid from that commented content. Is there any workaround the exclude the commented material from search.

ReSharper can do this for you. Do rightclick -> "find usages" in any of the .aspx, .ascx or .cs files.

but this is not compatible with express editions
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900