以编程方式设置Toolpart布局

时间:2012-05-24 12:29:25

标签: c# sharepoint-2010 web-parts toolpart

我正在按照本教程创建工具部分:http://www.dhirajranka.com/?p=420

我还需要了解的是如何: 1)为自定义工具部件添加标题 2)调整各种组件(按钮下拉列表等)

我被设计师的观点宠坏了,但现在我无法使用它,我有点失落。

问候

1 个答案:

答案 0 :(得分:1)

您需要将此行添加到您的webpart的属性中:

[ToolboxItemAttribute(false), WebBrowsable(true), WebDescription("Set the list name to use."), WebDisplayName("List Name"), Personalizable(PersonalizationScope.User)]
public string ListName{ 
    get{return customListName;}
    set{customListName = value;}
}

这很有效,现在我已经在我的SharePoint上运行了。

祝你好运!