Write a function public string getchar (str.length> len) {str = str.substring (0, len); str = STR "..."; return STR; } else {return str;}} uses <% # getchar (databinder.eval (to display field name ") .tostring (), 10)%> in the ASPX page.