I've left pieces of this here and here. But perhaps a little code would help. :)
Public Class MyWebPartInherits Microsoft.SharePoint.WebPartPages.WebPartPrivate 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"TryContext.Trace.Write(TRACE_CATEGORY, "Trying something")' Do something here' pretend there is a variableContext.Trace.Write(TRACE_CATEGORY, "variable value: " + variable)output.Write("you html code goes here")Catch ex As ExceptionContext.Trace.Warn(TRACE_CATEGORY, ex.ToString)End TryEnd Sub
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 2010, Paul Schaeflein
E-mail