title: Get data from a controller, return as json and preview in cshtml
body: <p>I have a controller that I get result exampleController.cs:</p>
  
  <pre><code>public expChart{
  ...
     public ActionResult ByContainer(int id)
      {
          var elementIds = _systemSettings.Z3FromZBIds; // CritialWorkPermitIds; 
  
          var kpiElements = CacheService.AllVisibleElements
                                        .Where(x =&gt; elementIds.Contains(x.Id)).ToList();
  
          var container = _kpiContainerService.Find(id);
  
          var result = _kpiTrendService.MonthByContainer(kpiElements, container);
          return AsJson(result);
      } 
  } 
  </code></pre>
  
  <p>I call it in example.cshtml:</p>
  
  <pre><code>&lt;div class="panel" style="display: none;" id="bottom-area-trend-charts" ng-ontroller="exampleController"&gt;
      &lt;div &gt;
          TEST
          {{element.Name}}
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I think it is something wrong with my calling. How can I call the result in my controller?</p>
  
  <p>Thanks in advance</p>