title: How to make @Html.EditorFor invisible?
body: <p>When I am just deleting the editor fields that I dont' want the user to see in the View , their data becomes null, I want to keep the data, but ,I don't want the user to edit it. </p>
  
  <pre><code>  &lt;div class="editor-label"&gt;
                  @Html.LabelFor(model =&gt; model.Name)
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                  @Html.EditorFor(model =&gt; model.Name)
                  @Html.ValidationMessageFor(model =&gt; model.Name)
              &lt;/div&gt;
  
  
              &lt;div class="editor-label"&gt;
                  @Html.LabelFor(model =&gt; model.parent_directory)
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                  @Html.DisplayFor(model =&gt; model.parent_directory)
              &lt;/div&gt;
  
              &lt;p&gt;
                  &lt;input type="submit" value="Add" /&gt;
              &lt;/p&gt;
  </code></pre>
  
  <p>The @Html.EditorFor I am referring to is model.parent_directory. Can anyone suggest a solution that doesn't involve js ? I tried using DisplayFor instead of EditorFor and I still get a null value.</p>