I’m having problems with Script#. I got a ASP.NET page which loads a JavaScript file and uses a object from there.
var tracker = Piwik.getTracker(...);
Now I also have a Script# generated JavaScript file which is also included in that same page. Now I want to use the tracker object in that Script# .cs file.
Type.InvokeMethod(tracker, "trackPageView");
Doesn’t compile: does not exist in the current context
Type.InvokeMethod("tracker", "trackPageView");
Compiles but outputs: ‘tracker’.trackPageView();
Any ideas?
Already found it:
Script.Literal("tracker.trackPageView()");