Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Wednesday, February 27, 2008

Simple and Complex Drilldown for ASP.Net Objects

It can be difficult to drill down through an ASPX page to see where your desired object is before you call FindControl. One quick way to figure out the control tree structure is the Document Outline tab of Microsoft Visual Studio. The only caveat is that you will still need to know your Master Page structure.

The complex overkill way is to use Trace="true" under the Page Directive (at the top of the aspx page.) This has other applications as well. For example, instead of debug prints you can see the state of many variables.

No comments: