Re: Unwanted <p> tags

  •  07-04-2008, 10:59 AM

    Re: Unwanted <p> tags

    Here's some code for getting rid of the unwanted IE <p> tags. It's a bit of a pain but, in my case, necessary. In this example the "Name" string is coming from an Editor control in a details view:
     

    string name_p2 = ((Editor)EventView.FindControl("CeName")).Text;

    // Clean the unwanted <p></p> tags that IE inserts

    string name_p1 = name_p2.Replace("<p>", "");

    string name = name_p1.Replace("</p>", "");

View Complete Thread