Software Technology Tips

SharePoint allows you to create custom web parts to help you provide highly customized solutions to your clients/users. The properties of these web parts are added by default but to further customize the solution, you can also create custom properties. The following example demonstrates how to add a custom dropdown property to a custom webpart.

// Create a Enum for Languages

public enum LanguageByEnum

{
       English = 0,
       French,
       Spanish
};
 
// Create Get/Set for the dropdown property  
 
protected LanguageByEnum languageName;
 
[Personalizable(PersonalizationScope.User),
Category("Select Language"),
WebBrowsable, WebDisplayName("Select language:")]
public LanguageByEnum SelectedLanguage
{
      get { return languageName; }
      set { languageName = value; }
}
 


Related Tags:

SharePoint

Author: Samarendra Swain

Related Pages

  • SharePoint Development Expertise
  • SharePoint Development Projects

SharePoint

Let us Connect!

privacy
iso 9001 QA25 Nasscom Red Herring zinnov STPI iso 27001

copyright (c) Mindfire Solutions 2007-2013. Login