Hello, I'm trying to figure out how to truncate text in a label control to allow maximum number of characters. I would like to avoid using code behind because the label is in a repeater and it is a nightmare to find controls there. This is what I have found here on the forum:
'<%# (Eval("ArticleText") .Length>=400) ? Eval("ArticleText").SubString(0,400) :Eval("ArticleText") %>'
However, I keep getting an error saying that the "?" operator is not allowed. I'm working in VB.net. Is there a way around this or is it possible to write an inline if statement here like in classic ASP?
Any help would be greatly appreciated. Thank you!