I am attempting to create a Visual Web Part to display users with presence (will be adding custom property to allow end users to choose which department's users they display)
However while I can retrieve and display data from the User Information List, it doesn't render as I might expect it to. Rather than showing the title (User's name/presence and hyperlink) in a list format, it is just showing them as strings.
SPWeb currentWeb = SPContext.Current.Web; SPListItemCollection listOfUsers = currentWeb.SiteUserInfoList.GetItems(); ListView1.DataSource = listOfUsers.GetDataTable(); ListView1.DataBind();
<asp:ListView ID="ListView1" runat="server"> <ItemTemplate> <asp:Label ID="Title" runat="server" Text='<%# Eval("Title") %>' /> </ItemTemplate> </asp:ListView>
Is it possible to get my ascx to show the user with presence? rather than as just a string?