multiple choice in transformation - show multiple or hide if none

L Younkins asked on August 24, 2022 16:02

Trying to add multiple choice category in a transformation. If there are multiple categories, I need to show them inline, separately, not run together (see second listing in image url). Here is my code:

<%# IfEmpty(Eval("Category"), "", "" + Eval("Category").ToString().Replace("|","    ") + "") %>

<%# Eval("NewsTitle") %>

<%# GetDateTime("NewsReleaseDate", "MM/dd/yyyy") %>

<%# Eval("NewsSummary") %>

Read More

Image Text

Recent Answers


L Younkins answered on August 24, 2022 16:02

<div class="newsbox">
<p class="category"> <%# Eval("Category").ToString().Replace("|"," &nbsp; ") %></p>
  <div class="newslist-item">
    <h4 class="news-title"><%# Eval("NewsTitle") %></h4>
    <p class="news-date"> <%# GetDateTime("NewsReleaseDate", "MM/dd/yyyy") %></p>
    <p class="news-summary"><%# Eval("NewsSummary") %> </p>
    <p class="readmore"><a href="<%# GetDocumentUrl() %>">Read More</a> 
  </div>
</div>
0 votesVote for this answer Mark as a Correct answer

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