String.Substring(startIndex, lenght):
lblAboutMe.Text = DT1["UserBody"].ToString().Substring(0, 100) + " ...";
MSDN -
, . 100 . shure, :
int maxLength = 100;
string body = DT1["UserBody"] != null ? DT1["UserBody"].ToString() : "";
if (!string.IsNullOrEmpty(body))
{
if(body.Length > maxLength)
{
body = body.Substring(0, maxLength);
if (body.Contains(" "))
{
while (body[body.Length - 1] != ' ')
{
body = body.Substring(0, body.Length - 1);
if(body.Length == 2)
{
break;
}
}
}
lblAboutMe.Text = body + "...";
}
else
{
lblAboutMe.Text = body;
}
}