SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add presence indicators to my custom webpart. I have found a blog post about it.

string.Format("<li><a class=\"ms-imnlink\" href=\"javascript:;\"><img width=\"12\" height=\"12\" id=\"IMID12\" onload=\"IMNRC(&#39;", Contact.Email, "&#39;)\" alt=\"My SID\" src=\"/_layouts/images/imnoff.png\" border=\"0\" showofflinepawn=\"1\"/ sip=\" \"></a>&#160;{0}</li>"

I know even how to get sip address.

But isn't there an easier way to show the presence indicator? Doesn't Sharepoint API any webcontrols for that?

share|improve this question
The most important thing is to provide a unique client id. perhaps with int counter or like this. – Anatoly Mironov Sep 21 '11 at 7:51
up vote 1 down vote accepted

If you're rolling your own web part, then yes you have to add them in. If you start from a list view, and the web application has the presence information enabled, then you can convert the list view web part to a dataview web part and the presense information should be included in the markup.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.