Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

IfEqual Element (View)

Windows SharePoint Services 3

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.

Allows for conditional rendering based on the comparison of two Collaborative Application Markup Language (CAML) expressions.






The following example uses the IfEqual element to define the display pattern for the Checked Out To column. If the user ID equals null, nothing is displayed. If the user ID does not equal null, a link is provided to a display form with information about the user.

         <Field Name="CheckedOutUserId" />
      <Expr2 />
      <Then />
         <HTML><![CDATA[ <a href="]]></HTML>
            <![CDATA[ /_layouts/[%=System.Threading.Thread.
         <Field Name="CheckedOutUserId" />
         <HTML><![CDATA[ ">]]></HTML>
         <Field HTMLEncode="TRUE" Name="CheckedOutTitle" />
         <HTML><![CDATA[ </a>]]></HTML>
© 2015 Microsoft