How do I stop HtmlEditorExtender encoding html in postback?

后端 未结 4 933
無奈伤痛
無奈伤痛 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 05:56

    I was able to solve this problem like this :

            Literal lit = new Literal();
            lit.Mode = LiteralMode.PassThrough;
            lit.Text = HttpUtility.HtmlDecode(HTMLTExt);
            TextBox1.Text = lit.Text; // The text box which HTMLEditorExtender is attached to
    

提交回复
热议问题