Script#

May 25, 2007

I just came across something that I originally found last year that I thought was so very cool.

I don’t know about you but the experience of writing Javascript without really good tools for debugging is a real pain in the a$$.

What if you could write C# with all of its strong-typed-ness and awesome development environment (VS.NET 2005) then just compile it to JavaScript?

Check out Script#

EDIT: Link to more updated build of Script# – thanks Nikhil for the correction

This is such a great idea – instead of compiling to IL – compile to Javascript. The combination of the C# to Javascript compiler  and the object oriented extensions MS made to Javascript for ASP.NET AJAX - makes for very clean Javascript code.

It even provides a debug version that has easy to read code and a release version that compresses everything down (no white space and small private variable names) to make it as small as possible.

I found a good screencast on Channel9 where the author (in about 9 minutes) writes a Javascript behavior in C# that provides text-box watermark functionality.

So very cool

 - M

One Response to “Script#”


  1. Cool… thanks for the link.

    The link above is to the original Script# intro post. For the video showing Script# working against ASP.NET AJAX, plus associated writeup, see http://www.nikhilk.net/ScriptSharpPastPresentFuture.aspx.


Leave a Reply