共用方式為


Expr2 Element (View)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Used as part of a comparison with the value contained in an Expr1 element. The Expr2 element contains the CAML expression that is evaluated to determine the course of action. The expressions can be any set of CAML elements that render text, or they can be other conditionals.

<Expr2>
</Expr2>

Attributes

Attribute

Description

None

N/A

Child Elements

Numerous

Parent Elements

IfEqual, IfNeg, IfSubString

Occurrences

Minimum: 0

Maximum: 1

Example

The following example evaluates two expressions, and if they are equal, it conveys a holiday greeting, but if not, it conveys a different message.

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

See Also

Reference

Expr Element (View)

Expr1 Element (View)