title: How to convert javascript variable to C# string in Razor View MVC?
body: <p>I have a model and it has one property as <code>Dictionary&lt;string, bool&gt;</code>. There are multiple links and I am calling same javascript method on click  and passing link id. Model dictionary key will be link id. so I want to set dictionary value true of false based on some condition using this key. I tried a lot but not able to do, Please help me out.
  I want to do something like this.</p>
  
  <pre><code>function LinkClick(id){
      string strKey = id; //strKey is C# string
      @Model.DictionaryIdSet[strKey] = true;
  }
  </code></pre>