| |||||||||||
AdRotator.AdCreated EventSystem.Web.UI.WebControls Namespace AdRotator Class Occurs once per round trip to the server after the creation of the control, but before the page is rendered. [ VB ] Public Event AdCreated As AdCreatedEventHandler [ C# ] public event AdCreatedEventHandler AdCreated; [ C++ ] public: __event AdCreatedEventHandler* AdCreated; In [ JScript ], you can handle the events defined by a class, but you cannot define your own. Event DataThe method assigned to handle the event is passed an AdCreatedEventArgs object containing data related to the AdCreated event. The following AdCreatedEventArgs properties provide information specific to this event.
RemarksThis event is raised once per round trip to the server after the creation of the control, but before the page is rendered. You can control how the AdRotator is displayed by modifying the arguments passed to the event handler of the AdCreated event. If the AdvertisementFile property is not set, this allows you to specify the advertisement information directly, without using a separate advertisement file. If the AdvertisementFile property is set, this allows to extend the behavior of the AdRotator control, such as redirecting to another page.
For more information about handling events, see Web Forms Events Model. ExampleThe following example demonstrates how to specify and code a handler for the AdCreated event. It obtains and displays the target URL, the image file, and the alternate text associated with the advertisement when the AdRotator gets created. <asp:adrotator runat = "server" target = "_blank" advertisementfile = "~/sys/web/ui/webcontrols/demos/Ads.xml" onAdCreated = "myAdCreatedHandler" /> See Also |
| ||||||||||
Check out related books at Amazon
© 2000-2008 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 aspxtreme