title: How to pass value by ViewData to Editor Template by @Html.EditorFor
body: <p>In the view strongly typed view against <code>@model   System.Tuple&lt;Person, List&lt;Survey&gt;&gt;</code></p>
  
  <p>I use inside a for-each loop:</p>
  
  <pre><code>  @Html.EditorFor(x =&gt; survey.Questions)
  </code></pre>
  
  <p>to render questions in a `Survey. It works flawless.</p>
  
  <p>Now I would also like to pass additional data to the custom Editor Template. I did:</p>
  
  <pre><code>@Html.EditorFor(x =&gt; survey.Questions, new { htmlAttributes = new { PersonId = 1000 } })
  </code></pre>
  
  <p>and then in the Edtior Template I want to refer to this <code>PersonId</code> and display it.</p>
  
  <p>This is Editor Template I made(shortcut for question purposes):</p>
  
  <pre><code>  @using WebApplication2.Models
      @model   Question
      &lt;div&gt;
          @ViewData["PersonId"]
      &lt;/div&gt;
  </code></pre>
  
  <p>but nothing shows up.</p>
  
  <p>How to properly pass <code>PersonId = 1000</code> to this EditorTemplate.</p>