/// Frank Hagen: Professional Web Developer, C# User, Reformed Über-geek RSS 2.0
# Tuesday, January 23, 2007

If you have tried to write trace info from an ASP.NET page, you know how useful this can be for debugging.  If you have tried to write to trace from another tier, you might have found it too difficult.  I did; until now:

To write to the current context trace (hint, hint), simply use the following call:

System.Web.HttpContext.Current.Trace.Warn(szCategory, szTraceMsg);

Yep, that's it.  So simple, yet so hard to find.  Now you (and I) know.

Tuesday, January 23, 2007 4:06:32 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
.NET
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: b, blockquote@cite, i, strike, strong, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
<%--
--%>
Statistics
Total Posts: 189
This Year: 2
This Month: 0
This Week: 0
Comments: 74
Locations of visitors to this page
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Frank W Hagen
Sign In
All Content © 2012, Frank W Hagen
Custom DasBlog theme based on 'Business' by Christoph De Baene