I want to call a JavaScript function in c# code in asp.net mvc3 view, but don\'t know how to do this. My code is following
Javascript Function
You can't call JS function on server side only in the views. And it wiil look like
@foreach(var item in collection) { ... ... }
Output html will contain several calls of this js function.