title: Using Page_Load and Page_PreRender in ASP.Net
body: <p>I see some people are using Page_Load and Page_PreRender in same aspx page. Can I exactly know why do we need to  invoke both the methods in same asp.net page?</p>
  
  <p>Please see the code below,</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          try
          {
              dprPager.ButtonClickPager += new EventHandler(dprPager_ButtonClickPager);
  
              if (!Page.IsPostBack)
              {
                InitPager();
  
              }
          }
          catch (Exception ex)
          {
  
          }
  
      }
  
      protected void Page_PreRender(object sender, EventArgs e)
      {
          erMsg.Visible = !string.IsNullOrEmpty(lblError.Text);
      }
  </code></pre>