creating advance custom property for a web part in sharepoint 2010
-
22-10-2019 - |
Question
so far i able to create a custom property with with single control something like this:
string _property1;
public string Property2
{
get
{
return _property2;
}
set
{
_property2 = value;
}
}
but i am looking to have little bit advance something like this:
a textbox with dropdownlist
any idea how would i do that or any link?
Thanks
Solution
http://blog.concurrency.com/sharepoint/create-a-custom-web-part-for-sharepoint-2010/
Please see the section on custom web part properties.
Short version:
- Textbox - String/Int
- DropDownList - enum
- Checkbox - bool
Alternatively, if you are looking for more functionality, take a look at EditorParts. This link is for 2007, but it should work the same way. Notice that YOU control the markup that is written to the edit mode properties of the web part.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange