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

Quick Tip - Clear ReSharper's Cache to Fix False Errors
Quick Tip - Refined GitHub
Vertical Layout for HTML Tables
Visual Studio 2017 Installer Quick Tip
VSColorOutput for VS 2017 Released
Quick ReSharper tip for inline templates
NoSQL vs. NewSQL: What's the Difference?
More... (1077)

Donate with PayPal