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?

  • The most important thing is to provide a unique client id. perhaps with int counter or like this. Sep 21, 2011 at 7:51

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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