title: how to call a javascript function in foreach in mvc3 view
body: <p>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 </p>
  
  <p><strong>Javascript Function</strong></p>
  
  <pre><code>function JK(){
  
     alert("Javascript Function Called From foreach");
  
    }
  </code></pre>
  
  <p><strong>C# Foreach</strong></p>
  
  <pre><code>foreach(var item in collection){ //I want to call JavaScript function here on every iterate.  
  }
  </code></pre>