开发者

Web Parts custom property not showing up

I'm trying to create a custom property for my web part, but can't get it to show up in Sharepoint. Here's my current code :

[Serializable]
[XmlRoot(Namespace = "MyWebPart")]
[DefaultProperty("Text")]
public class MyWebPart : WebPart
{
    ...
    [Category("My Web Parts Properties")]
    [DefaultValue(defaultPropertyValue)]
    [WebPartStorage(Storage.Shared)]
    [FriendlyNameAttribute("Property name")]
    [Description("Longer desc for my property")开发者_如何转开发]
    [Browsable(true)]
    [XmlElement(ElementName = "SomeProperty")]
    public string SomeProperty
    {
        get { return someProperty; }
        set { someProperty = value; }
    }

Is there something else required to get custom properties working?


I think you're using the wrong properties

SO - Sharepoint custom web part property does not show up in the toolbox

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜