Monday, January 19, 2009

Quickly check web page performance

Paste this somewhere in your codebehind, putting the dt definitions around the suspected code:
DateTime dt = DateTime.Now;
DateTime dt2 = DateTime.Now; 
DateTime dt3 = DateTime.Now; 
this.debugLiteral.Text = string.Format("<div>|{0}||{1}||{2}|</div>", dt, dt2, dt3);
And paste this somewhere in your aspx:
<asp:Literal ID="debugLiteral" runat="server" />

No comments: