tesicg
tesicg

Reputation: 4053

How to skip tag on master page depending on content page?

I have a MasterPage, but want to skip one tag that is placed on MasterPage when particular ContentPage is loading. Is it possible to do it?

Upvotes: 0

Views: 58

Answers (1)

Tim Schmelter
Tim Schmelter

Reputation: 460078

In the master's codebind:

protected void Page_Load(Object sender, EventArgs e)
{
    ContentPageName page = this.Page as ContentPageName;
    myTag.Visible = page == null;
}

Upvotes: 2

Related Questions