5
Answers

Limiting Character Data

Ask a question
I have problems in limiting my character data and adding a 'read more' in it. 

I am using this code 

 <%--<asp:Label ID="Label1" runat="server" Text='<%# Eval("BookSynopsis").ToString().Length>=100) ? Eval("BookSynopsis").ToString.SubString(0,100) :Eval("BookSynopsis") %>'></asp:Label>--%> 

but it doesn't work at all..

I want my book synopsis to be a limit of 100 characters and if it exceeds the 'read more' will be shown and be directed in 'details page'.
,.please help me. Thank you..


Answers (5)