【发布时间】:2026-02-05 11:05:02
【问题描述】:
我一直在使用 C. Coller 的出色 CopyAsHtml-Visual Studio addin 将 C# 代码作为 html 复制到网页。
现在,我开始怀疑是否有类似的工具可以将 aspx 标记转换为有效的 html 以显示在页面上?我正在寻找的功能可以在G. Houston's blog 上看到。
F.ex.如果我喂这个
<asp:Button id="btnSthing" runat="server"></button>
进入上面链接中的工具,它会为我生成以下内容:
<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color:
#000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height:
14px;padding: 5px; overflow: auto; width: 100%"><code><asp:Button id="
btnSthing" runat="server"></button></code></pre>
我可以简单地将其复制并粘贴到网站中以显示使用的 aspx 标记。
如果有这种功能的工具可以集成到 VS 中,我很想听听!其他实现此效果的方法也将不胜感激!
问候, J.阿罗拉
【问题讨论】:
标签: asp.net markup visual-studio-addins html-generation