Mono Support MessageList 

Viewed 20764 time(s), 2 post(s), 2/3/2011 2:42:05 AM - by dimonandrey
2/3/2011 2:42:05 AM
1 Reputation 1 Total posts

Working with MessageList question arose how to display user avatars next to each record in messagelist?

1
2/15/2011 11:57:57 AM
7207 Reputation 956 Total posts

Message parts are not templated (as they are rather complex), so the customization process is more involved. I would do it this way:
1. create a new MessageList.ascx in your project with the accompanying codebehind file and inherit from the MonoSoftware.MonoX.ModuleGallery.SocialNetworking.MessageList
2. do the same for the MessageCenter.ascx and change the line that references the original MessageList to point to your new MessageList control
3. create a new GridTemplateColum in the grid that is used to display messages that will contain a Gravatar control

declaration in the ascx header
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX.Blog" TagPrefix="monox" %>
...
in the templated column
<MonoX:Gravatar ID="ctlGravatar" runat="server" UserName='<%# Eval("AspnetUser.UserName") %>' />


That should be it - place your custom MessageCenter part on the page and it should contain a MessageList with the user avatar.

2
This is a demo site for MonoX. Please visit Mono Software for more info.