+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / How to set the SkinID of the SiteTabstrip

How to set the SkinID of the SiteTabstrip

5 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    22 Jan 2009
    Link to this post
    If I set the SkinID on an instance of a SiteTabstrip, like:

    <sf:SiteTabStrip 
        ID="RightNavigation" 
        Orientation="VerticalLeft" 
        SkinID="RightTabs" 
        EnableEmbeddedSkins="false" 
        StartingNodeUrl="~/AboutUs/" 
        runat="server" />

    ...I get a null reference exception:

    Line 521:        set
    Line 522:        {
    Line 523:            this.RadTabstrip1.SkinID = value;
    Line 524:        }
    Line 525:    }

    If I remove the SkinID attribute, no error.  Why isn't my sf:SiteTabstrip able to set the SkinID of the embedded radTabstrip?

    Thanks in advance,
    Mike
  2. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    22 Jan 2009
    Link to this post
    The null reference exception is happening on:

    this.RadTabstrip1.SkinID

    because this.RadTabstrip1 is null.   Obviously there's something wrong with how I'm declaring the Sitetabstrip. 

    So, I guess my question should really be:

    How do I explicitly use a Sitefinity RadTabstrip control in my master page, without adding it to an asp:ContentPlaceholder control from the Sitefinity Admin UI.

    Thanks again,
    Mike



  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Jan 2009
    Link to this post
    Hi Mike,

    Thank you for using our services.

    I regret to inform you that the property cannot be set in a user control. I tired to set 'SkinId' property in the Page_PreInit event, but didn't succeeded. My suggestion is to create a CustomControl and set the property there. This is the only way that I could come up with.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    23 Jan 2009
    Link to this post
    The thing is, it fails even before it gets to the SkinID, because this.RadTabstrip1 is null.  That means I can't set any of the properties, much less SkinID.  Setting SkinID works fine if you use the control designer in the Admin interface, but if I put the control directly into the master page, I can't even get a reference to the underlying RadTabstrip...

    If I want to declaratively put a control in the master page template, instead of dragging it into a contentplaceholder via the admin UI, how would I do it?

    Thanks for your help,
    Mike

  5. Pepi
    Pepi avatar
    981 posts
    Registered:
    28 Oct 2016
    30 Jan 2009
    Link to this post
    Hi Mike,

    As Ivan has already explained the SkinID property should be set in Page_PreInit. This means that you cannot specify it in the control declaration in the master page (if you remove SkinID setting, the site tabstrip will work fine). So, the workaround is to use Sitefinity designer.

    We are sorry for the inconvenience caused.

    All the best,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
5 posts, 0 answered