how can i trim news title characters length to 20 in latest news webpart(not in database attribute)
The below will get you a shortened version of the news summary data. Keep in mind the pad string ("...") counts towards the length (100 in this case).
<%# LimitLength(Eval("NewsSummary"), 100, "...", true) %>
You can use the macro method LimitLength(string text, int length, string padString, bool wholeWords) in your transformation. The last two parameters are optional.
LimitLength(string text, int length, string padString, bool wholeWords)
first thank you for your speed respons, but can you help me more how to add the macro in this news transformation :
and thank you again
thank you very much it is worked very well and thank you again
You can use this
Please, sign in to be able to submit a new answer.