Mike-Ward.Net

CopySourceAsHtml

CopySourceAsHtml is a free Visual Studio 2005 add-in that lets you copy source code as HTML. It even preserves the color coding. CopySourceAsHtml addes itself to the right-click menu so it’s easy to use. There are many options for formatting. Very handy for blog postings. Below is an example.

private void ReplySuccess(string message)
{
    Page.Response.ContentType = "text/xml";
    XmlWriterSettings xmlSettings = newXmlWriterSettings();
    xmlSettings.Encoding = new System.Text.UTF8Encoding(false);
    using (XmlWriter writer = XmlWriter.Create(OutputStream, xmlSettings))
    {
        writer.WriteStartDocument();
        writer.WriteStartElement("methodResponse");
        writer.WriteStartElement("params");
        writer.WriteStartElement("param");
        writer.WriteStartElement("value");
        writer.WriteElementString("string", message);
        writer.WriteEndDocument();
        writer.Flush();
    }
}
← newer older →
.Net, Technology, Life, Whatever

Recent Posts

How to Choose the Right VPN Service
Two Handy Command Line Scripts
Tweetz 1.3.2
Tweetz 1.3 Release
Mithril Rising
Tweetz Release 1.2.4 - Screen Off Detection
Tweetz Desktop Support for 280 Characters
More... (1084)

Donate