Follow in Twitter & Facebook

Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools

Wednesday, December 21, 2011

WebBrowsableAttribute and PersonalizableAttribute in SharePoint 2010

Webpart will have default properties like Title, Chrome Type, Size etc. But while developing a custom webpart properties like WebBrowsableAttribute and PersonalizableAttribute are used for setting properties for that webpart. So at the time of configuring the webpart these properties will be available.

The WebBrowsableAttribute class instructs the Web Parts infrastructure that the property has to be made available in the Web Part’s configuration panel.

It tooks boolean value like true or false. Here is how it declares [WebBrowsable(true)]
The PersonalizableAttribute declares that the property can be personalized and defines the scope of the personalization. It accepts scope as User or Shared. User means the property can be personalized on a per-user basis and Shared means the property personalization will be shared between all users.

It declares like below:

If you will use for a webpart property then it looks like below:

public String Name { get; set; }

You can also check SharePoint Articles and Jobs.

0 on: "WebBrowsableAttribute and PersonalizableAttribute in SharePoint 2010"