8/8/2014 9:32:15 AM
3016
Reputation
428
Total posts
Hi,
you can add this code to your markup:
<
asp:PlaceHolder
runat
=
"server"
ID
=
"plhNumber"
>
<
span
class='number'><%= this.NumberOfUnreadMessages%></
span
>
</
asp:PlaceHolder
>
and create a property in your code behind:
/// <summary>
/// Gets Number of unread messages.
/// </summary>
public
string
NumberOfUnreadMessages
{
get
{
return
MonoSoftware.MonoX.Repositories.MessageRepository.GetInstance().GetNumberOfUnreadMessages(SecurityUtility.GetUserId());
}
}
Also, you will need to add some styling to your markup in order to style your count icon. Below is an example of css snippet:
.login-status-register .
message-box
.active-message .number {
background-color
: Red;
font-size
:
10px
;
font-weight
:
bold
;
height
:
12px
;
line-height
:
12px
;
margin
:
0
;
padding
:
0
;
position
:
absolute
;
right
:
2px
;
text-align
:
center
;
top
:
2px
;
vertical-align
:
middle
;
width
:
auto
;
}
Regards.
Rating history (Content is rated 0.00 of 0 vote(s).)
Shows who have rated the content, and the rating score.