Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
JavaScript
<EditItemTemplate>
                        <asp:TextBox ID="txt_Discription" runat ="server" Text="<% #EVAL('Discription'); %>"></asp:TextBox>
                    </EditItemTemplate>


Given code is showing bellow error.
"Too many characters in character literal"

please help what i did wrong.
Posted
Updated 22-May-13 0:23am
v3
Comments
Rockstar_ 22-May-13 6:25am    
Remove semicolon and try : Text="<% #EVAL('Discription');
MuhammadUSman1 22-May-13 6:27am    
I have removed semicolon but same error

Replace EVAL with Eval.
Try this:
ASP.NET
<EditItemTemplate>
    <asp:TextBox ID="txt_Discription" runat="server" Text='<%# Eval("Discription")%>'>    
    </asp:TextBox>
</EditItemTemplate>



--Amit
 
Share this answer
 
v2
Comments
Rockstar_ 22-May-13 6:35am    
Try this solution, I think it will work.....
MuhammadUSman1 22-May-13 6:42am    
Thanks all of YOU for quick response and HELP
_Amy 22-May-13 23:52pm    
Welcome. :)
use double quotes instead of single quotes for i.e #EVAL("Discription")
 
Share this answer
 
v3
Comments
MuhammadUSman1 22-May-13 6:29am    
When i am trying #EVAL("Discription") this
it is showing following error.
"Server tags cannot contain<%...%> constructs"
MuhammadUSman1 22-May-13 6:45am    
Thanks Mahesh Bailwal.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900