2010-06-11 76 views
1

我正在嘗試爲我的Web部件創建自定義屬性,但無法使其顯示在Sharepoint中。這是我目前的代碼:Web部件定製屬性未顯示

[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; } 
    } 

是否還有其他需要獲得自定義屬性的工作?

回答

相關問題