AdCreatedEventArgs Class
Assembly: System.Web (in System.Web.dll)
The AdCreatedEventArgs type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AdProperties | Gets a System.Collections::IDictionary object that contains all the advertisement properties for the currently displayed advertisement. |
![]() | AlternateText | Gets or sets the alternate text displayed in the AdRotator control when the advertisement image is unavailable. Browsers that support the ToolTips feature display this text as a ToolTip for the advertisement. |
![]() | ImageUrl | Gets or sets the URL of an image to display in the AdRotator control. |
![]() | NavigateUrl | Gets or sets the Web page to display when the AdRotator control is clicked. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The AdCreated event is raised when the AdRotator control displays an advertisement on the page.
For a list of initial property values for an instance of AdCreatedEventArgs, see the AdCreatedEventArgs constructor.
For more information about handling events, see Events and Delegates.
| Topic | Location |
|---|---|
| How to: Select Ads in an AdRotator Web Server Control Programmatically | Building ASP .NET Web Applications |
| How to: Select Ads in an AdRotator Web Server Control Programmatically | Building ASP .NET Web Applications |
The following code example demonstrates how to specify and code a handler for the AdCreated event. It gets the URL associated with the advertisement when the AdRotator control gets created and displays it below the control. This example requires the XML file (Ads.xml) listed in the example below.
The following code example demonstrates how to format the XML file that contains the advertisement information. For more information on the XML file, see the AdvertisementFile property of the AdRotator class.
<Advertisements> <Ad> <ImageUrl>image1.jpg</ImageUrl> <NavigateUrl>http://www.microsoft.com</NavigateUrl> <AlternateText>Microsoft Main Site</AlternateText> <Impressions>80</Impressions> <Keyword>Topic1</Keyword> <Caption>This is the caption for Ad#1</Caption> </Ad> <Ad> <ImageUrl>image2.jpg</ImageUrl> <NavigateUrl>http://www.wingtiptoys.com</NavigateUrl> <AlternateText>Wingtip Toys</AlternateText> <Impressions>80</Impressions> <Keyword>Topic2</Keyword> <Caption>This is the caption for Ad#2</Caption> </Ad> </Advertisements>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


