Format source code in your blog posts 

There is a nice add-in for Visual Studio that allows you to copy your source code as HTML. This can be useful for example when you want to add a code sample to your blog posts.
The add-in is called CopySourceAsHtml (CSAH). It gives you an extra option in your edit- and context menu: 'Copy as HTML...'. The copied HTML reflects your Visual Studio color settings.
 
 
You can also use an online tool at http://www.manoli.net/csharpformat/. There you can paste your source code in a textbox and convert it to HTML. You will need to add an extra stylesheet to your blog website and add a reference to it in the <head> section of your page.
Posted on 10-03-2009 by Martin Opdam
1 Comments  |  Trackback Url  |  Link to this post
Tags: Visual Studio

Links to this post

Comments

07-05-2009 by Jonne Kats

This also is a nice plugin for windows live writer, which provides different types of formatting: http://stevedunns.googlepages.com/codeformatterforwindowslivewriter

 
Name:
URL:
Email:
Comments:

CAPTCHA Image Validation