asp.net.ph

AdCreatedEventArgs.AdProperties Property

System.Web.UI.WebControls Namespace   AdCreatedEventArgs Class


Returns a dictionary object that contains all the advertisement properties for the currently displayed advertisement.

Syntax


Script [ IDictionary variable = ] AdCreatedEventArgs.AdProperties

Property Value


variable A System.Collections.IDictionary that contains a list of ad properties extracted from an XML file.

The property is read only with no default value.

Remarks

The AdRotator automatically extracts the advertisement information from the XML file and stores the information in this property as a dictionary.

Additional information about an advertisement, such as a custom caption, may be provided in the advertisement XML file and accessed in the AdCreated event handler using this property.

Example

The following example demonstrates how to retrieve the AdProperties dictionary for the currently displayed advertisement, and at the same time assign the object as the DataSource for a Repeater control, which we use to display the ad properties.

void myAdCreatedHandler ( Object src, AdCreatedEventArgs e ) {
   adProps.DataSource = e.AdProperties;
   adProps.DataBind ( );
}

 Show me 

See Also

AdCreatedEventArgs Members   AdCreatedEventHandler   AdRotator Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph