C# 无法将xhtml呈现到页面
我试图从可爱的编辑器输出呈现xhtml,以便在我的页面中显示富文本。我正在尝试,但似乎对我不起作用C# 无法将xhtml呈现到页面,c#,asp.net,xhtml,C#,Asp.net,Xhtml,我试图从可爱的编辑器输出呈现xhtml,以便在我的页面中显示富文本。我正在尝试,但似乎对我不起作用 //ce_Document is my instance of cute editor public void btn_SaveMessage_Click(object sender, EventArgs e) { XhtmlTextWriter xtw = new XhtmlTextWriter(System.IO.TextWriter.Null); xtw.Write(ce_D
//ce_Document is my instance of cute editor
public void btn_SaveMessage_Click(object sender, EventArgs e)
{
XhtmlTextWriter xtw = new XhtmlTextWriter(System.IO.TextWriter.Null);
xtw.Write(ce_Document.XHTML);
}
看起来您正在将文本直接呈现到回收站(TextWriter.Null) 您应该写入正在生成的响应的输出流。试试这个(不知道它是否编译)
XhtmlTextWriter xtw = XhtmlTextWriter(new TextWriter(Response.OutputStream));