Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 .net 面板,我想通过 Outlook 将此面板发送给其他收件人。为此,我想我必须找到这个元素的 html 代码。怎么做 ?
谢谢。
使用 RenderControl 方法将内容输出到 HtmlTextWriter。
示例,它将内容输出到 StringBuilder。
StringBuilder content = new StringBuilder(); StringWriter sWriter = new StringWriter(content); HtmlTextWriter htmlWriter = new HtmlTextWriter(sWriter); pnlMyPanel.RenderControl( htmlWriter );