<html>
<head>
<title>AdCreated Event Handler Example</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<script language="C#" runat="server">
void AdCreatedHandler ( Object src, AdCreatedEventArgs e ) {
string props = "<b>Ad properties</b><br>";
props += "<b>Image File</b>: " + e.ImageUrl + "<br>";
props += "<b>Alternate Text</b>: " + e.AlternateText + "<br>";
props += "<b>Navigate URL </b>: " + e.NavigateUrl + "<br>";
adProps.Text = props;
}
</script>
</head>
<body>
<!-- #include virtual="~/shared/top.inc -->
<div class="header"><h2>AdCreated Event Handler Example</h2></div>
<!-- #include virtual="~/shared/viewsrc_top.inc" -->
<hr size=1 width=92%>
<form runat=server>
<div align="center">
<asp:adrotator id="AdRotator1" runat="server"
advertisementfile="~/webforms/demos/banners.xml"
borderwidth=1 target="_blank"
onAdCreated="AdCreatedHandler"/>
<p><input type=submit value="Reload" runat="server"></p>
<asp:label id="adProps" runat="server" /></p>
</form>
</div>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>