/// <summary>
/// For formatting lengthy string in Grid
/// </summary>
/// <param name="orginalString"></param>
/// <param name="limit"></param>
/// <returns>string</returns>
public static string GetShortString(object evelOrginalString, int limit)
{
string orginalString = HttpUtility.HtmlDecode(Convert.ToString(evelOrginalString));
return (orginalString.Length <= limit) ? orginalString : (orginalString.Substring(0, limit) + "..");
}
/// For formatting lengthy string in Grid
/// </summary>
/// <param name="orginalString"></param>
/// <param name="limit"></param>
/// <returns>string</returns>
public static string GetShortString(object evelOrginalString, int limit)
{
string orginalString = HttpUtility.HtmlDecode(Convert.ToString(evelOrginalString));
return (orginalString.Length <= limit) ? orginalString : (orginalString.Substring(0, limit) + "..");
}
No comments:
Post a Comment