Pop-under AdRotator and Ad Controls

PopUnder:AdRotator control

PopUnder:AdRotator control is based on standard ASP.NET AdRotator. The difference is that the ads are displayed in separate pop-under window instead of being in the page itself. It used the same XML file format as AdRotator with the exception that it requires Width and Height attributes specified for every image. The usage is the same as with ASP.NET AdRotator:

<%@ register namespace="PopUnder" TagPrefix="PopUnder" Assembly="PopUnder" %>
  
<PopUnder:AdRotator runat="server"
    AdvertisementFile="adrot.xml"
    KeywordFilter="colors"
    FrequencyPercent="50"
/>

FrequencyPercent indicates that the Ad should not be displayed on every request but only on certain percentage of refreshes (50 means half the time).

PopUnder:Ad control

PopUnder:Ad adds a single pop-under ad to a page:

<%@ register namespace="PopUnder" TagPrefix="PopUnder" Assembly="PopUnder" %>
  
<PopUnder:Ad runat="server"
    Title="PopUnder Ad"
    Url="http://www.asp.net"
    ImageSource="myimage.gif"
    ImageWidth=400
    ImageHeight=300
    FrequencyPercent=25
/>

Title will end up in the title of the pop-under window. Url indicates what happens (where the browser should go) when the user clicks on the pop-under window.  ImageSource is a Uri pointing to the image that fills the pop-under window; ImageWidth and ImageHeight are attributes of the image. FrequencyPercent is the same as in Popunder:AdRotorar, see above.

Contents of the package

readme.htm -- this file

PopUnder.cs -- source file with the C# code for both controls. To compile this source file please use:

csc /t:library /r:System.dll /r:System.Web.dll PopUnder.cs

PopUnder.dll (and PopUnder.pdb) -- compiled PopUnder.cs.

ad.aspx -- sample ASP.NET page using PopUnder:Ad control

adrot.aspx -- sample ASP.NET page using PopUnder:AdRotator control

adrot.xml -- data file used by adrot.aspx

*.gif -- sample images used in adds in ad.aspx and adrot.aspx

To use the samples please copy *.aspx, *.xml, *.gif files to the root of a web application and *.dll to the 'bin' directory under it.

License Agreement

Pop-under controls are completely free: modify, redistribute, or even sell them or their derivatives without any attribution, restrictions or limitations. In fact, attribution is discouraged.