nikhilk/scriptsharp — Issue #114: Window.ApplicationCache.Status.ToString() generates invalid JavaScript
Author: Griffitsj
Created: 2011-10-11 21:09:19+00:00
State: open

compiled version of a call to the C# Window.ApplicationCache.Status.ToString() generates JavaScript which throws a Reference Error: ApplicationCacheStatus is not defined

The Following code:

public class Class1
{
public static void DoSomething()
{
Script.Alert(Window.ApplicationCache.Status.ToString());
}
}

generates the following JavaScript:

ScriptLibrary1.Class1.doSomething = function ScriptLibrary1_Class1$doSomething() {
alert(ApplicationCacheStatus.toString(window.applicationCache.status));
}