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.

Comments

# re: ASP .NET Tracing on a GridLayout page.

Friday, May 20, 2005 4:12 PM by James C

1) I didn't think anybody used GridLayout

2) What's wrong with Trace.axd?

# re: ASP .NET Tracing on a GridLayout page.

Friday, May 20, 2005 4:16 PM by Chris McKenzie

1) lots of people use GridLayout: some of us got religion on FlowLayout late in the game, and others of us inherited projects that used GridLayout and can't change it right now.

2) I didn't know about Trace.axd until you mentioned it, but it appears to only log errors. I'm interested in Trace for reasons other than errors.

# re: ASP .NET Tracing on a GridLayout page.

Friday, May 20, 2005 4:40 PM by Chris McKenzie

I stand corrected: Trace.axd is good, but you still have to turn tracing on on the page for it to show up in Trace.axd. And if it's going to show up on the page, I'd like it to be put someplace useful. :-)

# re: ASP .NET Tracing on a GridLayout page.

Saturday, May 21, 2005 10:20 AM by Nikhil Kothari

Check out my ASP.NET Development Helper tool. It lets you hide trace and view it in a separate window as well, without having to add script to your page.

http://www.nikhilk.net/ASPNETDevHelperTool.aspx

# re: ASP .NET Tracing on a GridLayout page.

Wednesday, May 25, 2005 10:52 PM by Javier Luna

I believe that any DataLayer must be a simple code block, that they allow operations against DB.

That code block would not have to know on the Business Entities. Single to specialize it is to execute the operations (Store Procedures and SQL Sentences) against the engine DB (SQL, Oracle, DB2, etc.), with which this setting.

Finally, I invite to you to download the DataLayer.Primitives Public Version.

This is very cool Data Layer :)

DataLayer.Primitives - Readme!
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1389

Cheers,

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

Leave a Comment

(required) 
(required) 
(optional)
(required)