I'm trying to run a simple function on a dataset field but can not for the life of me figure out how to get it to work.
All I want to do it trim the text that is output by some bound data. The function I have written is below
On the page:Code:<script runat="server"> Function TrimTeaser( strString As String) strString = strString.Substring (0,4) End Function </script>
I have tried so many variations and all either complain of missing Expressions, no String data, or it simply does not print to the page. Help!Code:<%# TrimTeaser(ds_main_news.FieldValue("headerText", Container)) %>
Cheers,
Jeff




Reply With Quote