我想问一下如何使用HTMLTextWriter
. 到目前为止,我已经尝试过使用,html.writeline();
但它不起作用。有人可以就代码给我建议吗?谢谢。
这是我目前拥有的代码:
HtmlTextWriter html = new HtmlTextWriter(new StreamWriter(textBoxSave.Text)); //change to directory
html.RenderBeginTag("html");
html.AddAttribute("style", "background-color: white; color: black; font-size: small;");
html.WriteFullBeginTag("body");
html.WriteEndTag("body"); // body
html.RenderEndTag(); // html
html.Close();