<ugc:ForEachComment runat="server">
<ugc:ContextVariable runat="server" Var="ugcComment.user.name"/>
</ugc:ForEachComment>
By this I can print the name of the user who submitted the comment but now I want to store the name of the user in a variable in aspx page. How can I achive this?
I have tried creating the object of Comment class inside foreach comment but it gives the null reference error.
<ugc:ForEachComment runat="server">
<% Comment comment = new Comment(); %>
<%= comment.User.Name; %>
</ugc:ForEachComment>