IfEqual Element Home
IfEqual Element

The IfEqual element allows for conditional rendering based on the comparison of two CAML expressions.

Syntax

<IfEqual>
</IfEqual>

Related Elements

Parent ElementsChild Elements
Case, DisplayPattern, ForEach, ViewBody, XMLElse, Expr1, Expr2, Then

Example

In the following example, the IfEqual element renders the contents of either the Then or Else child element, based on whether the contents of the Expr1 and Expr2 elements are equal or not.

<IfEqual>
  <Expr1><Today/></Expr1>
  <Expr2>10/31/00</Expr2>
  <Then>Happy Halloween!</Then>
  <Else>Just another day</Else>
</IfEqual>

See Also

IfNew


© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View