ASP.NET WEB FORMS Remove a <p> and its contents from a DIV

Asked

Viewed 49 times

0

I have several DIVS that contain a < p >&nbsp ;< /p >. How do I remove this paragraph with space in Codebehind? (Without using JS or Jquery)

  • Why do you want to remove this in Codebehind? Explain your question better. Do you have an example of code?

1 answer

0

I’ve already figured out.

 (OBJETO).Text = Regex.Replace((OBJETO).Text, "<p>&nbsp;</p>", "", RegexOptions.Singleline)

;)

  • Leandro if you explain the answer may be that others with the same problem can learn too.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.