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

Checklist Buddy Available for Testing
Tweetz 2.0.0 Released
Tweetz 2.0 Beta
VSColorOutput 2.7 - Time Stamps
Fixed Focal-Length Eyeglasses, a Programmer's Best Friend
How to Choose the Right VPN Service
Two Handy Command Line Scripts
More... (1089)

Donate