Consider a website that uses master pages and web user controls excessively.
(1)Master -> (2)page - > (3)web control > (4)web control -> (5)web control
this example of five levels may contain multiple web controls at each level.
Please don't bother commenting about the design of this scenario, it is outside my grasp (not capabilities, but authorities).
Either way I want to add a simple timer on each master/page/web-user-control, so that i can TIME in milliseconds the time it takes to load.
DateTime dbg = DateTime.Now;
//...
if (!String.IsNullOrEmpty(Request.QueryString["dbg"])) Response.Write("<b>partial className:</b> " + DateTime.Now.Subtract(dbg).TotalMilliseconds + "<hr />");
The site is way too massive to do manually. Is there a way i can do this centrally, just for debugging/profiling reasons?
-theo