Custom Properties WebPart Sharepoint 2010

Posted: March 22, 2012 in web
namespace FormDisplay.VisualWebPart1
{
    [ToolboxItemAttribute(false)]
    public class VisualWebPart1 : WebPart
    {

...

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(true)]
        [System.ComponentModel.Category("Custom Properties")]
        [WebDisplayName("url:")]
        [WebDescription("URL:")]
        public string SiteURL
        {
            get
            {
                if (_siteURL == null)
                {
                    _siteURL = "";
                }
                return _siteURL;
            }
            set { _siteURL = value; }
        }

....
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s