This documentation is archived and is not being maintained.

AdRotator::AdCreated Event

Occurs each time an advertisement is displayed.

Namespace:  System.Web.UI.MobileControls
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

public:
 event AdCreatedEventHandler^ AdCreated {
	void add (AdCreatedEventHandler^ value);
	void remove (AdCreatedEventHandler^ value);
}
<asp:AdRotator OnAdCreated="AdCreatedEventHandler" />

If the AdvertisementFile property is set, this event occurs after the advertisement has been selected from the file.

The event handler receives an AdCreatedEventArgs property that contains the properties of the advertisement being displayed. The following table shows the properties that provide information specific to this event.

Property

Description

AdProperties

Returns the dictionary that contains all the advertisement properties extracted from an XML file after the AdCreated event is raised.

AlternateText

Specifies the alternate text and ToolTip (if supported by the browser) to be rendered in the AdRotator control.

ImageUrl

Specifies the image to be rendered in the AdRotator control.

NavigateUrl

Specifies the URL reference that the browser navigates to when the advertisement is clicked.

The following code sample handles the AdCreated event, and is only part of a larger example for the AdRotator class overview.

No code example is currently available or this language may not be supported.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1
Show: