title: Async controller rendering data
body: <p>I used to implement <strong>Sync</strong> actions in web api applications, and to get data asynchronously I used <strong>AJAX</strong> in the client part to get datas from api actions.</p>
  
  <p>Then I read about <code>async controller</code> , I need to know the lifecycle to render a page </p>
  
  <p>For example :</p>
  
  <pre><code> public async Task&lt;ActionResult&gt; PWGasync()
      {
          ViewBag.SyncType = "Asynchronous";
          var widgetService = new WidgetService();
          var prodService = new ProductService();
          var gizmoService = new GizmoService();
  
          var widgetTask = widgetService.GetWidgetsAsync(); 
           await Task.Run(widgetTask);
  
          var pwgVM = new ProdGizWidgetVM( widgetTask.Result  );
  
          return View("PWG", pwgVM);
      }
  </code></pre>
  
  <p>did the view will be rendred first and then the data will be displayed? </p>