Hi All,
I'm using WSS3.0 API to get all the webparts in an ASPX page.
The following is my code:
SPFile page = web.GetFile(pageGuid);
SPLimitedWebPartManager wpm = page.GetLimitedWebPartManager(PersonalizationScope.Shared);
WebPartFactory factory = new WebPartFactory();
foreach (System.Web.UI.WebControls.WebParts.WebPart webpart in wpm.WebParts)
{
//Some other logic
}
This code works fine for most of the web part. But for ParameterizableWebPart, it always returns an ErrorWebPart.
The page is correctly configured, because I can view all the reports in explorer.
Have you ever encounter this problem? Or there is something wrong with my code?
Any comments are appreciated. Thanks.