insert c# code inside javascript
<p>Greetings, 
how can I inject c# code (my Model property) inside javascript? I want to do something like this:</p>

<pre><code>$(".star&lt;%=Model.ROWGUID %&gt;").mouseover(function() {
    var span = $(this).parent("span");
    var newRating = $(this).attr("value");
    setRating(span, newRating);
});
</code></pre>

<p>This works fine for single view. But when I Render PartialView in loops it causes the problem. Even alert("test") in mouseover event is not executed</p>

<p><strong>EDIT</strong>
Ok, I figured out where the problem was. This was missing:</p>

<pre><code> $(document).ready(function() {
</code></pre>
