title: How MVC Web Application gets parameters without Request.Querystring?
body: <p>I'm working on a MVC web application. I need to download a file which I've stored as a byte[] stream in DB and its working fine. What I used to do on a button click I call a JS function and that calls a function in the C# backend and eventually download the file. Following is my JQuery code.</p>
  
  <pre><code>var DownloadDRR = function ()
  {
      var InvoiceId = $(".invoiceid").text();
      location.href = location.origin + "/Invoicing/DownloadDRR?InvoiceId=" + InvoiceId;
  }
  </code></pre>
  
  <p>And in the backend I normally get query string like this </p>
  
  <pre><code>Request.Querystring("InvoiceId");
  </code></pre>
  
  <p>But accidental I've discovered in my application if I write the following it still gets the <code>InvoiceId</code> without using <code>Request.QueryString()</code>.</p>
  
  <pre><code>public FileResult DownloadDRR(int InvoiceId)
          {
              InvoicingService Invoices = new InvoicingService(Client);
              byte[] RawExcel = Invoices.GetExcelService(InvoiceId);
  
              MemoryStream stream = new MemoryStream(RawExcel);
  
              stream.Seek(0, SeekOrigin.Begin);
              return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "test.xlsx");
          }
  </code></pre>
  
  <p>Can anyone explain why please?</p>