SharePoint User Group UK

Share the knowledge!

Welcome to SharePoint User Group UK Sign in | Join | Help
in
Home Blogs Forums Photos Files Roller

Overriding ToolParts with the ASP.NET

Last post 05-14-2008, 3:10 PM by santiago. 1 replies.
Sort Posts: Previous Next
  •  05-13-2008, 12:06 PM 10671

    Overriding ToolParts with the ASP.NET

    Hi,

    I have been attempting to perform the following

    public override ToolPart[] GetToolParts()
    {
    ToolPart[] toolparts = new ToolPart[1];
    WebPartToolPart wptp = new WebPartToolPart();
    CustomPropertyToolPart custom = new CustomPropertyToolPart();
    toolparts[1] = custom;
    return toolparts;
    }

    which allows me to only show the webpart settings I create. However, to do this I need to derive from Microsoft.SharePoint.WebPartPages.ToolPart.

    http://msdn.microsoft.com/en-us/library/ms948930.aspx

     

    Is their anyway to do the samething, but using the recommended System.Web.UI.WebControls?

    Hope that makes sense?

    Kind Regards

     

  •  05-14-2008, 3:10 PM 10715 in reply to 10671

    Re: Overriding ToolParts with the ASP.NET

    There isn't an easy way to do this only with ASP.NET 2.0 controls. This is a custom implementation in sharepoint. To do this with asp.net 2.0 you have to extend the tool part manager to inspect the webpart class  or make an interface to do that defines this method and in the extended tool part manager look for this method. Again, there isn't a pre defined way to do this.

    If you need this on sharepoint, you should use
    Microsoft.SharePoint.WebPartPages.ToolPar

    Hope this helps
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems