SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a single GlobalNavigation delegate control that displays different markup based on a condition (code below shows only the negative condition, an over simplified version). The MyGlobalNavigationFixup behavior happens even when the tag shouldn't render.

That is, when this code executes, MyGlobalNavigationFixup effects the page. Because it is inside a negative condition, I would not expect it to affect the page.

What I'm trying to create is a single delegate control that uses the MyGlobalNavigationFixup only in certain situations.

<%@ Control Language="C#" %>
<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 

<% if (false) { %>
    <SPSWC:MyGlobalNavigationFixup ID="globalnav" runat="server"/>
<% } %>

How can I render/use/apply MyGlobalNavigationFixup based on a condition?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.