ASP .NET Tracing on a GridLayout page.
I've wanted to use tracing for awhile and was inspired by Kevin Blakely's Post on ASP .NET Tracing in a popup window. I didn't want the tracing in the popup window--just wanted to move it down the page below my other controls. So, I borrowed Kevin's code and modified it as follows:
var
defaultHeight = 600; var
origOnLoad; if
(!origOnLoad) document.onload; window.onload = moveTraceContent;
// moves the trace div to desired position.
function
moveTraceContent(height) {
var traceDiv = GetTraceDiv(); if (traceDiv) {
if (!height) height = defaultHeight; traceDiv.style.position = "absolute";
traceDiv.style.top = height;
}
if (origOnLoad) return origOnLoad(); }
// Returns the div that is created by the ASP.Net trace
function
GetTraceDiv() {
var div = document.getElementById('__asptrace'); return div; }
Of course, you could tweak moveTraceContent to do whatever you wished.