Quantcast
Channel: Clients – Random Technical Thoughts
Viewing all articles
Browse latest Browse all 8

How to add your own WebPart properties

$
0
0

If you are creating your own part you might want to add a property for the users to set when editing the webpart.

At the top of your web part class add the following code (before any methods).

[FriendlyName("Project Site Template")]
[Personalizable(PersonalizationScope.Shared)]
[WebBrowsable(true)]
public string ProjectsiteTemplateName { get; set; }

This will add a property (in my case called Project Site Template) for the users to set when editing the web part.

This allows the user configure the web part for what you need (instead of hard coding some things).

[tweetmeme only_single=”false”]


Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images