Message board approved messages count

Sathish Kannan asked on April 4, 2016 13:52

Hi,

I'm using message board as "Leave a comment" form in my application. I just want to show the count of approved messages. Can you please suggest idea to get the count of approved messages and I'm using ASCX transformation.

Thanks Kannan

Correct Answer

Dawid Jachnik answered on April 4, 2016 13:58

Hello,

There is a simple function, you need only to pass board id which message coming from.

CMS.MessageBoards.BoardMessageInfoProvider.GetMessagesCount(boardId,true,true)
2 votesVote for this answer Unmark Correct answer

Recent Answers


Sathish Kannan answered on April 4, 2016 15:05 (last edited on April 4, 2016 15:08)

Thanks for your reply.

I'm new to Kentico, this might be a silly question. Where to find board ID and it seems integer value. How to include this in ASCX transformation (For ex:

count:<%#your_syntax_to_get_approved_message_count%>
).

Thanks

0 votesVote for this answer Mark as a Correct answer

Anton Grekhovodov answered on April 4, 2016 15:49

Hi,

You can find it in Board_Board database table.

Syntax in transformation:

<%# CMS.MessageBoards.BoardMessageInfoProvider.GetMessagesCount(boardId,true,true) %>

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.