我如何将 aspx-markup 格式化为 html 以在网页上显示它

发布于 2024-07-25 05:43:17 字数 1038 浏览 4 评论 0原文

我一直在使用 C. Coller 优秀的 CopyAsHtml-Visual Studio 插件将 C# 代码作为 html 复制到网页。

现在,我开始想知道是否存在类似的工具可以将 aspx 标记转换为有效的 html 以在页面上显示? 我正在寻找的功能可以在 G 上看到。 休斯顿的博客

F. 前。 如果我将其输入

<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>&lt;asp:Button id=&quot;
btnSthing&quot; runat=&quot;server&quot;&gt;&lt;/button&gt;</code></pre>

我可以简单地将其复制并粘贴到网站中以显示所使用的 aspx 标记。

如果有一个可以集成到 VS 中的实现此类功能的工具,我很想听听! 实现此效果的其他方法也将不胜感激!

问候, 阿罗拉

i've been using C. Coller's excellent CopyAsHtml-Visual Studio addin for copying C# code as html to a webpage.

Now, i started to wonder if there exists a similar tool for converting the aspx-markup to valid html to show on page? Functionality that i'm looking for can be seen on G. Houston's blog.

F.ex. if i feed this

<asp:Button id="btnSthing" runat="server"></button>

into the tool in link above, it generates the following for me:

<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>

and i can simply copy and paste this into a website to show the aspx-markup used.

If there's a tool for this sort of functionality, that would integrate into VS, i'd like to hear about it! Other methods for achieving this effect would be greatly appreciated too!

greets,
J.Arola

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

宫墨修音 2024-08-01 05:43:17

我不知道 VS 有这样的工具,但是以下网站允许您获得多种语言(C#、Java、PHP、XML、HTML、ASPX)的 HTML 格式的源代码:
http://codeconverter.sharpdevelop.net/FormatCode.aspx

I'm not aware of such a tool for VS, but the following website allows you to have source code from several languages (C#, Java, PHP, XML, HTML, ASPX) formatted for HTML:
http://codeconverter.sharpdevelop.net/FormatCode.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文