title: AJAX/JSON vs. Server Side Controls
body: <p>I am currently developing a single page application using jQuery and ASP.NET(C#). The diagram below illustrates my current approach for the solution implementation:</p>
  
  <p><a href="https://i.stack.imgur.com/LNgpq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LNgpq.png" alt="solution implementation"></a></p>
  
  <p>(1) User interacts with webpage, making a request for data, triggering a JQuery event.</p>
  
  <p>(2) AJAX sends request to code-behind.</p>
  
  <p>(3) Code-behind queries database for requested data.</p>
  
  <p>(4) Database returns query results.</p>
  
  <p>(5) Code-behind formats results into JSON file and sends it back to browser.</p>
  
  <p>(6) JQuery parses through JSON file and updates the view.</p>
  
  <p>I have been reading up on how to call code-behind methods using JQuery AJAX requests, and have come to a conclusion which I would like to verify here. It appears as though, by replacing the .html file with a .aspx file, those elements which are configured to function as server-side controls can be directly manipulated in the code-behind (the server). Initially, this seemed preferable to my approach because it would discard the need to create a JSON file and have to browser update the page (i.e.: one less step in the data retrieval process). However, if I were to take this alternative approach, would my solution still be considered an SPA? I.e.: does the server-side code-behind update the existing page in the browser, or does it generate a new page and send it back to the browser. If the former is true, then I will use server-side controls, otherwise I will continue with the approach illustrated above.</p>
  
  <p>(I posted this question on webmasters.stackexchange.com, but was told it was off-topic)</p>