Data binding in gridview column using eval
- by ROBIN
I hava grid containing a column for displaying countrynames. I need to display value in that column as contrycode-first 10 letters of country name (in-India) .I tried it using Eval functions with in the item template:
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="CountryNameLabe" runat="server" Text='<%# Eval("CorporateAddressCountry").SubString(0,6) %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
But it shows error.
Can i use custom functions in eval?
please help