This topic demonstrates how to add Microsoft Lync Controls to an existing HTML Web application using Microsoft Silverlight.

To integrate a Lync Control into an Internet application, use the objectelement 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.

Prerequisites

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

Start with an Existing Web Application

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.

  Copy imageCopy Code
<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, in Application Strategies in Lync Control Applications see "Adding Presence to an Existing Silverlight Application."

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.

See Also

Other Resources