More in this section
Forums / Suggestions / options on generic content control

options on generic content control

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Vangelis
    Vangelis avatar
    153 posts
    07 Jan 2006
    09 Sep 2007
    Link to this post

    I think it would be nice to have some extra options on Generic Content control besides just entering content.  One use could be to make a content to display or not while it is on the page. This would help to have content on a page - remove them temporarily and when needed it would show up again. There are some times where offers come and after some time could be removed. Also this would help in case of registered users that would have the option to see content on a page that is not available to public.

    Also this could prevent page design since there would not be the need to remove anything that is not used from a page.

    Best regards


  2. Vlad
    Vlad avatar
    498 posts
    19 Jun 2017
    11 Sep 2007
    Link to this post
    Hi Vagelis,

    Thank you for the suggestions.
    Actually, we have plans to implement a similar functionality, not only for GenericContent control. But this task is not scheduled yet.

    In the upcoming SItefinity 3.1 you could create a User Control, which wraps existing GenericContent control, and implement your custom logic there. The User Control should implement IContentContainer interface and its Content property should have an appropriate WebEditor attribute. For example:

    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ExtGenericContent.ascx.cs" Inherits="UserControls_ExtGenericContent" %> 
    <%@ Register Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls" TagPrefix="sfWeb" %> 
    <sfWeb:GenericContent runat="server" ID="GenericContent1" /> 

    using System;  
    using System.Data;  
    using System.Configuration;  
    using System.Collections;  
    using System.Web;  
    using System.Web.Security;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using System.Web.UI.WebControls.WebParts;  
    using System.Web.UI.HtmlControls;  
    using Telerik.Cms;  
    using Telerik;  
    using Telerik.Cms.Engine.WebControls;  
    using System.ComponentModel;  
    using Telerik.Cms.Web.UI;  
    public partial class UserControls_ExtGenericContent : System.Web.UI.UserControl, IContentContainer  
        protected void Page_Load(object sender, EventArgs e)  
        #region IContentContainer Members  
        [WebEditor("Telerik.Cms.Engine.WebControls.HtmlContentEditor, Telerik.Cms.Engine")]  
        public object Content  
                return this.GenericContent1.Content;  
                this.GenericContent1.Content = value;  
        public string ProviderName  
                return this.GenericContent1.ProviderName;  
                this.GenericContent1.ProviderName = value;  

    In the current Sitefinity version 3.0 the above implementation with User Control does not work. Instead of User Control you should use a compiled WebControl.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered