title: Can Razor engine parse Html.Encode(ViewData["varname"])?
body: <p>Passing data (simple string) from Controller to View I have in my controller:</p>
  
  <pre><code> public ActionResult Create()
          {
              ViewData["user"] = System.Environment.UserName.ToUpper();
              return View();
          }
  </code></pre>
  
  <p>and in my cshtml</p>
  
  <pre><code>&lt;h2&gt;Welcome &lt;%=Html.Encode(ViewData["user"]) %&gt;&lt;/h2&gt;
  </code></pre>
  
  <p>I checked and verifieid that the username does get populated, however, it does not get displayed on the page.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Using asp.net mvc 3 with Razor</p>