CSControl:ConditionalContent - a thing to remember!

When using the ConditionalContent control from CommunityServer, always remember to use the <ContentConditions> tag when detailing the condition. Hmm that sounds obvious. No, its not. The control also has the DisplayCondition tag which is what we commonly use for other controls! Here is an example of correct usage:

<CSControl:ConditionalContent runat="server">
  
<ContentConditions><CSControl:QueryStringPropertyValueComparison
QueryStringProperty="condition" Operator="EqualTo"
ComparisonValue="true" runat="server" /></ContentConditions>
   <TrueContentTemplate>It's true!</TrueContentTemplate>
   <FalseContentTemplate>It's false!</FalseContentTemplate>
</CSControl:ConditionalContent>

Ahh that was good.

↓ Add Comment

Comments (0)