tags:

views:

603

answers:

2

All, I am looking for a way to add an OCS presence icon the same that you would see in sharepoint, but i am looking to add it in a custom asp.net web site.

Please assist!

Bill.

+2  A: 

You can use the "Presence in a Web App" sample from Microsoft.

http://www.microsoft.com/downloads/details.aspx?FamilyId=AEBFA4E2-B30E-43A6-BF34-6403465BC9A9&displaylang=en

adeel825
I tried this, however the solution is not simple. its rather complex, and it doesnt show the red/green/yellow indicator like i would like, it just shows a white indicator. It also shows a funny looking context and its outside of the application window.
Bill Daugherty
+1  A: 

Take a look at the following sample from Microsoft (Not the AJAX one!): http://www.microsoft.com/downloads/details.aspx?familyid=63388959-7320-4ffd-9167-655365d94b67&displaylang=en

To understand how to get a presence indicator that is visible when you hover over a span text look at the C:\Program Files\Microsoft Office Communications Server 2007\Developer Samples\Presence in Web Applications using Communicator Automation API\Samples\Demo\LitwareInc\resources\team\Example.html file after installing the sample.

If you want to add a presence indicator that always shows up you need to create a new ID for each img tag you add to your page. You can do this in codebehind by incrementing a counter variable by 1 each time:

<img id=img" + presenceCounter + " src=presence_img/presence_16-unknown.png onload=PresenceControl(\"" + Mail_Address + "\")></span>`
mathias florin