Walkthrough: Add Presence to an Existing Web Application

Walkthrough: Add Presence to an Existing Web Application

This walkthrough and the accompanying video show how to add Microsoft Lync 2010 Controls to an existing HTML web application by using Microsoft Silverlight.

To integrate a Lync Control into an Internet application, use the object element to embed the Silverlight plug-in into the HTML. For more information, see the MSDN article How to: Add Silverlight to a Web Page by Using HTML. For general information about developing Silverlight applications, see the MSDN article Silverlight Roadmap.

For a list of prerequisites, see Walkthrough: Presence Hello World.

You can use your own web application, or create one using the following HTML. The object tag will contain the Silverlight application and determine 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 and add a MyStatusArea control to it. For more information, in Application Strategies in Lync 2010 Control Applications see ”Adding Presence to an Existing Silverlight Application.”

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 that is created earlier. This creates the .xap file that is 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 that is identified in the previous step.

  4. Launch the web application. See the MyStatusArea control embedded in the rendered page.

Show:
© 2016 Microsoft