I have seen in another post that you can call a JavaScript function in your razor code like so:
@:FunctionName()
For me though this only ou
If you are passing any parameter to the JavaScript function, it must be enclosed with quotes ('').
foreach (var item in files) { }