Export (0) Print
Expand All

If Control

Ff749142.note(en-us,MSDN.10).gifNote:
Current information about Live Connect is now available in the Windows Live Developer Center. The information in the following sections is provided for legacy purposes only.

The If Control displays XML content based on dynamically updated criteria. For example, if you specify <wl:if cid="-1665810327775112144" condition="online">, and if that particular CID is offline when the page loads, then the if tag is automatically re-evaluated after the page loads.

The content of the wl:if tag is visible for a brief period before the page loads, and this may cause a "flicker" effect each time the page loads. To avoid this, apply the display:none style attribute to the wl:if tag, as shown in the following example.

<wl:if cid="$user" style="display:none"> ... </wl:if>

After the tag is evaluated by the runtime engine, the display:none style attribute is removed. However, the wl:if tag's other style attributes remain intact and render as authored.

The following example shows the markup for inserting the If control into a Web page.

<wl:if
   cid="-01234456789"
   condition="online">
Markup to display if the condition is met.
</wl:if>

Name Type Required Default Value Description

cid

String

Yes

none

Sets the CID for the contact. You can specify the $user value to evaluate a condition for the signed-in user.

condition

online | available

Yes

none

Sets the condition to evaluate.

Show:
© 2014 Microsoft