More in this section

Forums / Developing with Sitefinity / Disable CssFileLink?

Disable CssFileLink?

2 posts, 0 answered
  1. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    22 Feb 2010
    Link to this post
    I attempted to disable the CssFileLink by setting both Enabled and Visible to False, however this seems to have no effect on the control.

    what is the correct way to have the control on the page with a css file, but set it's visibility at runtime?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    22 Feb 2010
    Link to this post
    Hi SelArom,

    Setting Visible to false should work because this does not call Render method of the control and the stylesheet is not set. There is no implementation for Enabled, because enabled is property that is supposed to work with forms ( when set you have "grayed" effect and you see the form, but you cannot click on it).

    You can implement custom logic for showing/hiding, enabling/disabling the control by creating a custom class that inherits from it and overriding CreateChildControls or Render method.

    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