Result count in repeater macro

lawrence whittemore asked on March 26, 2015 16:48

I have a repeater and want to adjust the before content field if the count is greater than one. What I want to do is Change the word "Location" that I have in the before content to "Locations" when there is more than one location being pulled into the repeater.

Is this possible?

Recent Answers


Brenden Kehren answered on March 26, 2015 18:23

I don't think you have access to this in the ContentBefore or after but it's worth a try:

<%# DataRowView.DataView.Count <= 1 ? "Location" : "Locations" %>
0 votesVote for this answer Mark as a Correct answer

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