Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.