.NET to Javascript compiler

C# code   Html page   Start
public class JDatePickerApp
{
    public static void Start()
    {
        InitPickers();
    }

    internal static void InitPickers()
    {
        InitPicker(1033, "g", CalendarApp.Renderer);
        InitPicker(1031, "d", null);
    }

    static void InitPicker(int lcid, string format, Action<HtmlElement, JDate> renderer)
    {
        JDatePicker datePicker = new JDatePickerDropDown()
        {
            FormatInfo = CultureInfos.TryGetCultureInfo(lcid).DateTimeFormat,
            Renderer = renderer,
            Skin = renderer != null ? DropDownSkin.CalendarWithImages : null
        }.Inline;

        datePicker.Format = format;
        datePicker.Element = (HtmlSpan)HtmlDocument.Current.GetElementById("datePicker" + lcid);

        HtmlElement value = HtmlDocument.Current.GetElementById("value" + lcid);
        HtmlElement status = HtmlDocument.Current.GetElementById("status" + lcid);
        datePicker.Advise(delegate()
        {
            JDate date = datePicker.Value;
            value.InnerText = date != null ? date.ToString("g", datePicker.FormatInfo) : null;
            status.InnerText = datePicker.IsValid ? "valid" : "invalid";
        });
    }
}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
    <meta http-equiv="x-ua-compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7" />
    <link rel="stylesheet" href="styles/jscriptsuite.css" type="text/css" />
    <link rel="stylesheet" href="styles/summary.css" type="text/css" />
    <script type="text/javascript" language="javascript" src="js/jdatepicker.js"></script>
  </head>
  <body onload="StartScript()">
		DatePicker.html
      <table cellpadding="2" cellspacing="0">
          <tr>
              <th>&#160;</th>
              <th>1033 (Format g, auto activate)</th>
              <th>1031 (Format d)</th>
          </tr>
          <tr>
              <td>Picker</td>
              <td>
                <span id="datePicker1033" contenteditable="true" class="datePicker"></span>
              </td>
              <td>
                  <span id="datePicker1031" contenteditable="true" class="datePicker"></span>
              </td>
          </tr>
          <tr>
              <td>Value (g)</td>
              <td id="value1033"></td>
              <td id="value1031"></td>
          </tr>
          <tr>
              <td>Status</td>
              <td id="status1033"></td>
              <td id="status1031"></td>
          </tr>
      </table>
	</body>
</html>
© 2009 JScriptSuite. All rights reserved.