title: Asp.NET - Multiple Instances of AdRotator
body: <p>I've created a master page that uses 3 instances of System.Web.UI.WebControls.AdRotator each backed by the same XML file of ad elements. For example,</p>
  
  <pre><code>&lt;asp:adRotator AdvertisementFile="/ads.xml" Runat="server"/&gt;
  
  *** ads.xml ***
  &lt;Advertisements&gt;  
    &lt;Ad&gt;
        &lt;ImageUrl&gt;/Path/Banner.gif&lt;/ImageUrl&gt;
        &lt;NavigateUrl&gt;http://www.google.com&lt;/NavigateUrl&gt;
        &lt;AlternateText&gt;
           The best search engine in the world!
         &lt;/AlternateText&gt;
        &lt;Impressions&gt;3&lt;/Impressions&gt;
     &lt;/Ad&gt;
  &lt;/Advertisements&gt;
  </code></pre>
  
  <p>The problem is on occasion the same ad will appear in 2 or more of the AdRotators at a given instant.   </p>
  
  <p>What's the best way to make the ads presented at any given time unique? One possibility is to separate the ads into 3 distinct XML files and assign each AdRotator a different file. However, that leads to a given ad always being in the same location that may or my not be the "premium" location on the page.</p>