CSControl:ConditionalContent - a thing to remember!
Posted by Anders Vindberg
in Lunarmedia Blog
on the 08 May. 2009 (13,514 views).
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.