Pass string Message in ob
public string RemoveHTML(string ob)
{
string str = string.Empty;
string splitText = string.Empty;
str = Regex.Replace(ob, @”<[^>]*>”, “”, RegexOptions.Compiled);
if (str.Length > 100)
{
splitText = Server.HtmlDecode(str.Substring(0, 100) + “…”);
}
else
{
splitText = str;
}
return splitText;
}