The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
I'm going to start a session of some posts about selectors in Sitefinity. There won't be a lot of coding, because I will describe some general aspects of the topic. In this post I will work with user control and selectors will be set as a properties of this control.
We will define selectors in the code behind of our user control.
1. Content selector.
Content Selector
As a result the Guid of a selected item will be returned. You can browse from Generic_Content, News,
Blogs, Images and Documents, Events.
#region Properties//content selector
[WebEditor("Telerik.Cms.Engine.WebControls.ContentSelector, Telerik.Cms.Engine")]
public Guid SelectContent
{get
{return this.selectContent;}set
{this.selectContent = value;}}//declare Provider Name property
public virtual string ProviderName{get
{return this.providerName;}set
{this.providerName = value;}}private Guid selectContent;
private string providerName = string.Empty;#endregion
2. Image and document selectors
Image selector
Document Selector
//image selector
[WebEditor("Telerik.Libraries.WebControls.ImageSelector, Telerik.Libraries")]
public string SelectImage{get
{ return this.image; }set
{ this.image = value; }}private string image;//document selector
[WebEditor("Telerik.Libraries.WebControls.DocumentsSelector, Telerik.Libraries")]
public string SelectDoc{get
{ return this.doc; }set
{ this.doc = value; }}private string doc;
Coming soon Part 2 - file manager selector, page id selector, rss feed selector
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites
Progress collects the Personal Information set out in our Privacy Policy and the Supplemental Privacy notice for residents of California and other US States and uses it for the purposes stated in that policy.
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.