Hi,
I suggest to override the RenderWebPart method instead of Render method.
From this document(MSDN) "Although the Render method of the WebPart base class is defined to be overridden, it is not recommended that you do so. Instead, to implement the rendering for a Web Part, override the RenderWebPart method".
Here is a code sample about using WebPart class:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.aspx
Feel free to reply if you have any questions in SharePoint.
best regards
Patrick Liang
TechNet Community Support
No comments:
Post a Comment