title: ASP.net return View with data variables
body: <pre><code>public ActionResult Index()
  {
     return View("test", new {a = 1, b = 2});
  }
  </code></pre>
  
  <p>and my view:</p>
  
  <pre><code>&lt;%= a; %&gt;
  </code></pre>
  
  <p>I get an error:</p>
  
  <blockquote>
    <p>'a' is not declared. It may be inaccessible due to its protection level.</p>
  </blockquote>