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

时间:2022-09-20 10:42:27

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

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

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.

现在,我开始怀疑是否存在类似的工具,用于将aspx-markup转换为有效的html以显示在页面上?我正在寻找的功能可以在G.休斯顿的博客上看到。

F.ex. if i feed this

F.ex.如果我喂这个

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

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

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

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!

如果有这种功能的工具,那将集成到VS中,我想听听它!其他实现此效果的方法也非常受欢迎!

greets, J.Arola

1 个解决方案

#1


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

我不知道VS的这样一个工具,但是下面的网站允许你从HTML格式的几种语言(C#,Java,PHP,XML,HTML,ASPX)获得源代码:http://codeconverter.sharpdevelop。净/ FormatCode.aspx

#1


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

我不知道VS的这样一个工具,但是下面的网站允许你从HTML格式的几种语言(C#,Java,PHP,XML,HTML,ASPX)获得源代码:http://codeconverter.sharpdevelop。净/ FormatCode.aspx