How to: Add enhanced presence to a Web application

Learn how to add Microsoft Lync Controls to an existing HTML Web application using Microsoft Silverlight.

Applies to: Lync 2013 | Lync Server 2013

Watch the video: Add Lync Controls to a Web Application

Prerequisites

For a list of prerequisites, see How to: Create a Silverlight page that displays a Lync presence control.

Start with an existing Web application

You can use your own Web application or create one using the following HTML. The object tag contains the Silverlight application and determines how much space it occupies in the HTML page.

<html>
<head>
</head>
<body>
<object width="300" height="300" 
data="data:application/x-silverlight-2," 
type="application/x-silverlight-2" >
<param name="source" value="myApplication.xap"/>
</object>
<p>Text in an HTML paragraph element</p>
</body>
</html>

Create a Silverlight application

Create a Silverlight application and add a MyStatusArea control to it. For more information, see How to: Create a Silverlight page that displays a Lync presence control.

Embed the presence application in the HTML page

In the HTML page, add a reference to the Silverlight project .xap file.

To embed the presence application in the HTML page

  1. Build the Silverlight application created earlier.

    This creates the .xap file needed in the next steps.

  2. In the Silverlight project’s Bin/Debug folder, locate the .xap file.

  3. In the Web application, update the value attribute in the param element to point to the .xap file identified in the previous step.

  4. Launch the Web application.

    See the MyStatusArea control embedded in the rendered page.

Next steps

After adding the presence control to a Silverlight page, the next tasks are to add presence controls for other users, add a contact list that is customized to show team members, and start conversations with those users whose presence shows as available.

See also