This project is read-only.


Jan 1, 2010 at 7:08 PM


Whne I log to Extensions tab, I have 7 extensions provide by default (all enabled), 6 of then I don't have the "Edit" link for. Clicking on the view beside CodeFormatterExtension, lands me on a page that indicates

Source for [C:\inetpub\...............\Extensions\CodeFormatterExtension.cs] not found.

Thanks for your help

Nov 5, 2010 at 7:27 AM
Edited Oct 24, 2011 at 6:00 PM

Same Error here too with the latest version: BlogEngine.NET

Java Blog

Nov 5, 2010 at 8:14 AM

The Edit link only appears if there's something to edit.

The View link is not broken ... we should maybe remove it or modify how it works.  Simple extensions will have a CS file directly in the Extensions folder.  For these, the View link works.  For extensions that have multiple files and are contained in a subfolder, the View link doesn't work.  The View link isn't subfolder aware.  It doesn't find a simple CS file in the Extensions folder and reports that message.  The extension is actually there.  The View link just shows the source code of the extension.  For these extensions that are in subfolders, you can view the source code with a normal editor or VS.  The View link cannot handle these types of extensions.

Nov 5, 2010 at 8:33 AM
Edited Oct 24, 2011 at 7:00 PM

How to get the formatter to actually format the code? 

Like in the format of the extension website:

The HTML source code is below.

<!-- .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: Consolas,"Courier New",Courier,Monospace; background-color: rgb(255, 255, 255); }.csharpcode pre { margin: 0em; }.csharpcode .rem { color: rgb(0, 128, 0); }.csharpcode .kwrd { color: rgb(0, 0, 255); }.csharpcode .str { color: rgb(0, 96, 128); }.csharpcode .op { color: rgb(0, 0, 192); }.csharpcode .preproc { color: rgb(204, 102, 51); }.csharpcode .asp { background-color: rgb(255, 255, 0); }.csharpcode .html { color: rgb(128, 0, 0); }.csharpcode .attr { color: rgb(255, 0, 0); }.csharpcode .alt { background-color: rgb(244, 244, 244); width: 100%; margin: 0em; }.csharpcode .lnum { color: rgb(96, 96, 96); } -->

   1:  private void BindGrid()
   2:    {
   3:      if (GenerateEditButton)
   4:        grid.AutoGenerateEditButton = true;
   6:      if (GenerateDeleteButton)
   7:        grid.AutoGenerateDeleteButton = true;
   9:      grid.DataKeyNames = new string[] { _settings.KeyField };
  10:      grid.DataSource = _settings.GetDataTable();
  11:      grid.DataBind();
  12:    }

Nov 5, 2010 at 8:37 AM

I was just testing it, since I don't use it often.  Here's an example of what you would type in the WYSIWYG editor when composing the post:


string test = "testing...";

bool value = true;


This specifies the language is C# and to turn line numbers on (ln=on).

One problem I found was the formatting of the code with line numbers.  If you're using a recent build, in the Styles folders is Global.css where the code formatting CSS is defined.  Or you can modify the code formatter styles in your own theme too.  I made changes to the following two CSS styles.

.code p { padding: 0; }

.code .lnum { color: #606060; float: left; clear: left; }

Nov 5, 2010 at 8:39 AM

There's also other syntax highlighting code you can use (not included with BE).

A popular one is Syntax Highlighter.  Ruslan created an extension for it that works with BE.

His post with extension code download is here.

Nov 5, 2010 at 8:58 AM
Edited Oct 24, 2011 at 7:00 PM

Here is what I got from the code


string test = "testing...";

bool value = true;


Nov 5, 2010 at 9:56 AM
Edited Oct 24, 2011 at 7:00 PM

Got it working locally for now with the

Syntax Highlighter extension


Had issues with the User Controls having the folder"syntaxhighlighter_2.1.364"  saying can not have two different langs but deleted it and add again and now it works ?

Well its working now how I don't know but it does work now


thanks for your help.

<input class="title_id" type="hidden" value="22522340" />