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

VSColorOutput for VS 2017 Released
Quick ReSharper tip for inline templates
NoSQL vs. NewSQL: What's the Difference?
Exploring Mithril, A JavaScript Framework for Building Brilliant Applications
Tweetz 1.1
Tweetz Desktop 1.0
Tweetz 0.11 Released
More... (1073)

Donate with PayPal