SharePoint 2013 WebPart属性面板配置

SharePoint 2013 WebPart属性面板配置
为WebPart添加右侧的属性面板,方便将来对于WebPart的配置,我们只需要在CustomWebPart.cs文件里面,声明一下变量即可:
private   string  url  =   string .Empty;
        [WebBrowsable(
true )]
        [WebDisplayName(
" 浏览页地址 " )]
        [WebDescription(
" 配置杂草信息的浏览页地址 " )]
        [Category(
" 杂项设置 " )]
        [Personalizable(
true )]
        
public   string  thisurl
        {
            
get
            {
                
return  url;
            }
            
set
            {
                url 
=  value;
            }
        }
        

参考: http://www.cnblogs.com/jianyus/p/3458374.html
 

你可能感兴趣的:(SharePoint 2013 WebPart属性面板配置)