how to call a javascript function in foreach in mvc3 view

后端 未结 4 1035
逝去的感伤
逝去的感伤 2020-12-10 09:12

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

4条回答
  •  醉酒成梦
    2020-12-10 09:33

    Well you can use something like this:

    foreach (var item in collection) {
       
    }
    

    If you need to use foreach inside the javascript code, you should just use . Like this:

    
    

提交回复
热议问题