Tuesday 24 January 2012

Adrotator

The AdRotator Web server control can be used to display graphics that are linked to other pages. The list of graphics to be displayed and the associated target links ...


HTML View
--------------
<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>








XML View
------------

<Advertisements>
<Ad>
<ImageUrl>/banners/w6.gif</ImageUrl>
<NavigateUrl>http://www.w3schools.com</NavigateUrl>
<AlternateText>W3Schools Main Site</AlternateText>
<Impressions>50</Impressions>
<Keyword>elearning</Keyword>
</Ad>
<Ad>
<ImageUrl>/banners/rd_xhtml.jpg</ImageUrl>
<NavigateUrl>http://www.w3schools.com/xhtml/default.asp</NavigateUrl>
<AlternateText>XHTML Tutorial</AlternateText>
<Impressions>50</Impressions>
<Keyword>XHTML</Keyword>
</Ad>
</Advertisements>

No comments: