title: How to fill Repeater only on first Load
body: <p>In my page, I load various sections after the initial Page load, via Postbacks and <code>.Visible = true</code>. I have a Repeater control which I want to fill from a data source, but only the first time I load the Control.</p>
  
  <p>Initially, I had tried something like the following, which is obviously not correct:</p>
  
  <pre><code>void Page_PreRender(object sender, EventArgs e)
  {
      if (Repeater1.DataSource == null)
      {
          Repeater1.DataSource = GetDataInitial(); // Does the query of the data source
          Repeater1.DataBind();
      }
  }
  </code></pre>
  
  <p>In short, I am trying to query some set of properties to tell me whether or not something has already bound data to it. I can't use <code>!Page.IsPostBack</code> since the Load may happen on a Post-Back.</p>
  
  <p>If it helps, we can assume that I am only loading this section on the <code>Click</code> event of the control <code>Button1</code>.</p>