Wilco Syntax Highlighter for ASP.NET Tutorial

I am looking for a good syntax highlighter for my new site. I was searching the forum on ASP.NET and eventually stumble upon Wilco’s syntax highlighter. It is open source which gives you the power to configure it. That site lacks a good tutorial and no examples are provided, so it took me a while to figure out how to customized it. (maybe because I’m still a newbie)

First, open and build Wilco’s project in Visual Studio. Then go to “Wilco.SyntaxHighlighting\bin\Debug” folder to get copy the compiled dll file and paste into the bin folder of your other project. Add reference and browse the dll file. Add it to the toolbox by right clicking the area in the toolbox section, browse the dll file again. You should see 4 more controls in the toolbox. Now just drag and drop it into your web page. Select the mode, language and text.

To customize the look, you can change the style setting in the SyntaxHighlighterTemplates.cs file.

Advertisements

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: