none
WebPart - using multiple instances of same EditorPart

    Question

  • Hi

    I am trying to create an EditorPart that houses the URLAssetSelector control so the user can select an image when they are editing their web part.
    I am confused as to how I would allow the user to select multiple images using the same part e.g. Image 1, Image 2 etc.
    As far as I can see, inside the EditorPart ApplyChanges method you assign your value back to the appropriate webpart property

    i.e. (from MSDN site)


    Code Snippet
    public override bool ApplyChanges()
    {
    TextDisplayWebPart part =
    (TextDisplayWebPart)WebPartToEdit;
    // Update the custom WebPart control with the font style.
    part.FontStyle = PartContentFontStyle.SelectedValue;

    return true;
    }


    Is there a way that I can dynamically provide the property at run time (e.g pass the property when I initialise the EditorPart), rather than it being fixed?

    Thanks
    Mark
    Saturday, March 01, 2008 9:24 AM