Set maximum length of text displayed by <%#Eval("...")%>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

maybe it is banal question, but somehow I can not articulate command <%#Eval("Short")%> to me for example. News of show only 250 characters.

Please help.
13 years ago
Hi,

I've done this before, by adding a new read only property to the class that returns a substring based on the actual string value and referencing this from the eval.

Adding a string.substring() in the aspx/ascx will throw an exception if the string to be truncated is shorter than the target length.

HTH.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.