More in this section

Forums / Developing with Sitefinity / Access to base properties from UC working as template of ContentView.

Access to base properties from UC working as template of ContentView.

2 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    16 Feb 2006
    11 Feb 2010
    Link to this post
    Hi Team,

    It's possible to access from one UserControl extending UserControl base that work as mapped template for one ContentView to the base properties of contentView. I have one UC working as template to edit news using configuration mapping. This UC extend System.web.userControl base like normal. I need to access to base.DataId from the ContentView that use this template to get the edited guid. It's possible or i not. Is the good way?.
    Could you suggest the best way to extend properties of mapped templates. Actually i use UC:System.Web.UserControl adding some custom items and methods but may be the best way is extend the partial class working as host like (public class vVacItemNew : ContentItemNew<vVacItemsView>) but don't like cast the items inside.

    Cheers, Romi.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    11 Feb 2010
    Link to this post
    Hi Pierre,

    It is not possible to access base properties from a ContentView template. You need to add the logic in your custom class that inherits from ContentView. You could create a control reference from the custom class to controls in your template.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered