title: Javascript Variables in MVC Partial Views
body: <p>This might be quite simple but I am having difficulties with it.  I have a view where I am setting a javascript variable, within that view I display a partial view using <code>RenderPartial</code> like so:</p>
  
  <pre><code>@{Html.RenderPartial("MyPartialView");}
  </code></pre>
  
  <p>I need access to a js variable set in my View, in my PartialView.  Is this possible? I know there are several other ways to pass data using models but for my unique scenario it would be very helpful if I could do it this way as I am already passing a model so I can't do it that way.</p>