SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Friday, January 21, 2005

I've left pieces of this here and here. But perhaps a little code would help. :)

Public Class MyWebPart
Inherits Microsoft.SharePoint.WebPartPages.WebPart

Private Const TRACE_CLASS_ID As String = "MyWebPart"

Protected Overrides Sub RenderWebPart(ByVal output as System.Web.UI.HtmlTextWriter)
Dim TRACE_CATEGORY As String = TRACE_CLASS_ID + "RenderWebPart"

Try
Context.Trace.Write(TRACE_CATEGORY, "Trying something")
' Do something here

' pretend there is a variable
Context.Trace.Write(TRACE_CATEGORY, "variable value: " + variable)

output.Write("you html code goes here")

Catch ex As Exception
Context.Trace.Warn(TRACE_CATEGORY, ex.ToString)
End Try

End Sub

Friday, January 21, 2005 12:35:56 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  |  Tracked by:
"Debugging Web Parts" (ASP.Net Development) [Trackback]
"Debugging Web Parts" (Paul Schaeflein's SharePoint Experience) [Trackback]
"Debugging Web Parts" (Paul Schaeflein) [Trackback]

Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

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

© Copyright 2008, Paul Schaeflein

Send mail to the author(s) E-mail