<script  runat="server">
   Sub change_url(sender As Object, e As AdCreatedEventArgs)
     e.NavigateUrl="http://www.w3s.com.cn"
   End Sub
</script>

<html>
<body>

<form runat="server">
<asp:AdRotator AdvertisementFile="Ad1.xml"
runat="server" OnAdCreated="change_url"
target="_blank" />
</form>

<p><a href="ad1.xml" target="_blank">View XML file</a></p>

</body>
</html>