Massoud Mazar's Blog

Sharing The Knowledge

About the author

Massoud Mazar has been doing .net development since 2002. He is founder and president of Evolynx, Inc.
E-mail me Send mail

Recent comments

Don't show

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

formatting C# code in your BlogEngine.net blogs

I thought this may save someone a little time:

If using BlogEngine.net as your blogging tool, you can format your code using one of the extensions which comes with the tool.

some of the things to remember:

1- first create an opening and closing [code] tag surrounding some zzz characters. Simply type the characters in the editor, all lower case, and make sure to press "ENTER" after each line:

[ code:c#]

zzz

[ /code]

(ignore the space I added after the opening brackets)

2- Do not copy your code directly from Visual Studio. Copy it first to Notepad, then copy from Notepad to replace "zzz". Make sure it only replaces the 3 z characters, not the linefeed after them.

And that's it. BlogEngine.net extension formats your code beautifully.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: blogging
Posted by Mazar on Saturday, April 26, 2008 1:51 PM
Permalink | Comments (0) | Post RSSRSS comment feed