Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Writing a custom webpart property programmatically

  Asked By: Sampat    Date: May 12    Category: Sharepoint    Views: 2390


in my webpart I do have this custom property:

public string Names
get { return (this.MyNames); }
set { this.MyNames = value; }

This property does not appear in the edit pane and that is wanted.
My question is how can I write values into this custom property

Example where I want to store "Bob" into SharePoint so that the
property "Names" will always have the value "Bob":

this.Names = "Bob";

But this does not work. What am I doing wrong?



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Writing a custom webpart property programmatically Or get search suggestion and latest updates.