How To Remove Div Tag From Html Editor Contents In Asp.net
I am working on an application. In this application I have to insert News detail into Sql Databse.For entering Article i have used a Html editor.My code is:- objNews.Article = Serv
Solution 1:
Try this instead:
(?i)</?div[^>]*>
Description
Solution 2:
try this once
string divTag = "div";
objNews.Article = Server.HtmlEncode(Regex.Replace(ckedi.Content.Trim().ToString(), "(</?)" + divTag + @"((?:\s+.*?)?>)", ""));
Post a Comment for "How To Remove Div Tag From Html Editor Contents In Asp.net"