pradeepy
asked on
jAVASCRIPT IN TEXT TAG OF ITEMTEMPLATE
Hi,
I have a datagrid in which i have a template column. Iam trying the following code
<asp:TemplateColumn HeaderText="JobTitle">
<ItemTemplate>
<asp:Label runat="server" Text= "javascrpit:if('<%# DataBinder.Eval(Container, "DataItem.jobtitle").ToStr ing().Leng th %>' > 40 )" '<%# DataBinder.Eval(Container, "DataItem.jobtitle").ToStr ing().SubS tring(0,40 ) %>';>
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
Iam writing a javascript code within text tag of item template
The condition is if jobtitle is greater than 40 take the first 40 characters of jobtitle.
However it is giving an error as server tag not well formed. Can any one tell me what the correct javascript code is.
Any comments and suggestions are welcome.
Thanks in advance.
I have a datagrid in which i have a template column. Iam trying the following code
<asp:TemplateColumn HeaderText="JobTitle">
<ItemTemplate>
<asp:Label runat="server" Text= "javascrpit:if('<%# DataBinder.Eval(Container,
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
Iam writing a javascript code within text tag of item template
The condition is if jobtitle is greater than 40 take the first 40 characters of jobtitle.
However it is giving an error as server tag not well formed. Can any one tell me what the correct javascript code is.
Any comments and suggestions are welcome.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.