SharePoint Error: cannot be imported or used in a WebPartZone control
Filed in SharePoint on Jul.17, 2009
The WebPart1.testxyz class does not derive from the Microsoft.SharePoint.WebPartPages.WebPart class and therefore cannot be imported or used in a WebPartZone control.
A quick fix for this error will be to change System.Web.UI.WebControls.WebParts.WebPart to Microsoft.SharePoint.WebPartPages.WebPart
Eg:
public class testxyz : Microsoft.SharePoint.WebPartPages.WebPart //instead of System.Web.UI.WebControls.WebParts.WebPart { }
Related posts:























Leave a Reply
You must be logged in to post a comment.