How do I stop HtmlEditorExtender encoding html in postback?

后端 未结 4 853
無奈伤痛
無奈伤痛 2021-01-21 05:16

I have a user control that contains a text box, an HtmlEditorExtender, and a button. The user control is loaded into a parent page using LoadControl().

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-21 06:09

    My understanding of the HTML extender is that the HTML tags are added based on the tools used on the toolbar. Have you tried loading the tb.text with:

    "This is a test"

    as opposed to

    "< p >This is a test< /p >"

    As to why it is doubling up on you like that, if the extender is adding the tags with every update then it seems as though they would(should) keep being added with every iteration.

    ...put the "p" tags around the textbox in markup

提交回复
热议问题