Hello,
There is a method called "TextHelper.LimitLength" for that. As per documentation:
LimitLength(object textObj, int maxLength, string padString)<%# LimitLength("Some example long text", 10 , "...") %>
• Limits text specified in the first parameter to the length specified in the second parameter. The last parameter is the trimming postfix, i.e. the string appended to the end of the shortened string. The trimming postfix is included in the maximal length, i.e. if the "..." postfix is used with maximal length of 100 characters, the returned string will have the first 97 characters of the original string, followed by three dots.
If you use macro expressions, you can use the following parameter:
|(limitlength)<chars> - Calls TextHelper.LimitLength making your value having some maximum length with ellipsis
For more information on the macro approach please check the following
article. For more information on the mentioned methods please check the
API reference.
You can also write a custom transformation method, which would do the trimming and replacing for you as described in our
documentation.
Best regards,
Boris Pocatko