title: Updating view by calling Action Method from Javascript
body: <p>I have a javacript Like this:</p>
  
  <pre><code>&lt;script&gt;
      function GetFromDate() {    
          var dt1 = document.getElementById('fromDate').value;
          var dt2 = document.getElementById('toDate').value;
          var url = "Statistics/Excel/"  + dt1 + "!" + dt2;        
          window.location.href = url;
          return false;
  
      };
  &lt;/script&gt;
  </code></pre>
  
  <p>and in controller my ActionResult is like this:</p>
  
  <pre><code> public ActionResult Excel(string id)
          {
                \\ View Creation
                 if(SomeLogic)
                    {
                           \\Excel Download Options
                    }
            return View(viewModel);
         }
  </code></pre>
  
  <p>Though it is perfectly working with the Excel Downloading option but it is not returning the View. Any Suggestions?
  For more information "viewModel" object contains the perfect data to be displayed.</p>