I need to bind multiple lines of text from backend in repeater..
i have used this..Text='<%#Limit(Eval("feedback_details"),40)%>'
aspx.cs file..
protected string Limit(object Desc, int length)
{
StringBuilder strDesc = new StringBuilder();
strDesc.Insert(0, Desc.ToString());
if (strDesc.Length > length)
{
return strDesc.ToString().Substring(0, length) + "...";
}
else return strDesc.ToString();
}
it displays the text in same line like this
this is a sample.......
i want to implement like this
this is a sample paragraph. this is a sample paragraph. this is a..........read more
it should display text in two or three lines...remaining text text should be hidden. when we click readmore..it should display remaining text
kindly help me