title: What methods are executed in which order in this ASP.NET webforms page
body: <p>I was refactoring some old website the other day and stumbled upon this scenario. I have an ASP.NET 3.5 C# WebForms page. In the code behind I have an event handler like so:</p>
  
  <pre><code>protected override void OnPreRender(EventArgs e) { }
  </code></pre>
  
  <p>On the other hand, in the markup, I also have:</p>
  
  <pre><code>&lt;script language="C#" runat="server"&gt;
      void Page_PreRender()
      {
  
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Question is: <strong>what does the lifecycle look like? What is executed first? Is one of them even executed?</strong></p>