如何从不同的ascx.cs更改sitecore中的项目可见性

如何从不同的ascx.cs更改sitecore中的项目可见性,sitecore,sitecore6,sublayout,Sitecore,Sitecore6,Sublayout,我正在使用代码 Sitecore.Data.Fields.RendererField Thecontent = (Sitecore.Data.Fields.RendererField)Sitecore. Context.Database.GetItem("my item path").Fields["Text"]; if (Thecontent != null) { Thecontent. .. ????????

我正在使用代码

Sitecore.Data.Fields.RendererField Thecontent = (Sitecore.Data.Fields.RendererField)Sitecore.
            Context.Database.GetItem("my item path").Fields["Text"];
        if (Thecontent != null)
        {
            Thecontent. .. ????????
        }

我想把它藏起来。此字段位于另一个ascx中,我想从另一个子布局访问它。

上下文项应该可以从所有子布局中访问

但是,如果您希望在不同的用户控件之间进行通信,则此问题不是Sitecore特有的,已在此处解决:

如果你查看谷歌,还有更多:


隐藏渲染器的规则需要在其他ascx中?我的意思是,您是否可以在其他地方(.cs)评估此规则?您在这里试图实现什么?这个问题没有给出多少线索。