the description which is comming from database has n开发者_开发问答umber of <p> </p>
these tags
so my page is occuyping large amount of blank space.
I want to remove all those blank
tag which are coming at end of page
How to do this?
you can use like this
string[] tags = {" ","<p>","</p>","<br>"};
string str1 = "this is best<br> tag <p> </p> <p> in the asp.net</p>";
foreach (var tag in tags)
{
str1 = str1.Replace(tag, "");
}
There is a similar issue with Tiny MCE in the Umbraco CMS. A work around can be found here: http://our.umbraco.org/forum/using/ui-questions/6266-Empty-p-tag-when-inserting-macro-into-text-editor - tho this is for C# but may help you in the right direction
精彩评论