Can anyone tell me how to substring a GridView BoundField object please?
I tried this so far and it hasn't worked. Thank you.
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ChopString((string)Eval("description")) %>'></asp:Label>
</ItemTemplate>
You need to use substring.
I believe thats all you need.
Make sure your
ChopString
method is either protected or public in the page's codebehind.ChopString
is not a built-in function. Make your own:ASPX Codebehind
Example: