This tool allows you to highlight your code in VS and have the option to “Copy As Html” in the right-click menu. You can then paste it directly to your blog or post.
Here’s an example:
16 if (!Page.IsPostBack)
17 {
18 if (Page.User.Identity.IsAuthenticated)
19 {
20 string userid = Page.User.Identity.Name;
21 SetLinks(userid);
22
23 loggedin.Visible = true;
24 loggedout.Visible = false;
25 }
26 else
27 {
28 loggedin.Visible = false;
29 loggedout.Visible = true;
30 }
31 }
32 }
Easy enough, right? No need to open up another application and format it, etc… Lovin it. However, in Wordpress, if you go back and make an update to the post, the indentations are removed and everything floats left… ehh..
P.S If you like my VS Theme, you can pick it up here.