title: How can i use model in Javascript?
body: <p>Example :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          function abc() {
              var t = document.getElementById("name").value;
              @foreach(Player pl in Model){
              if (t == pl.Name) {
                  alert("This name is already use!");
              }                
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>Error : t - cannot resolve symbol 
  How can i use JavaScript variable in C# code? Is it possible in this example?</p>