title: How to set array of controls to placeholder?
body: <p>I am a beginner with asp.net 
  I'm doing a image retrieval project , in the end i have images links
  now , i create image control, give it the link and add to the placeholder
  but it give me error : Object reference not set to an instance of an object </p>
  
  <p>code :</p>
  
  <pre><code>  System.Web.UI.WebControls.Image [] result = new System.Web.UI.WebControls.Image[links.Count()];
  
    for (int h = 0; h &lt; result.Length; h++)
      {     
         result[h].ImageUrl = links[h];  /// here's the error 
         PlaceHolder1.Controls.AddAt(h, result[h]);    
      }
  </code></pre>