Create Web Form to demonstrate use of Adrotator Control.

 Adrotator.aspx 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Adrotator.aspx.cs" 

Inherits="AdrotatorControl.Adrotator" %> 

<!DOCTYPE html> 

<html xmlns="http://www.w3.org/1999/xhtml"> 

<head runat="server"> 

</head> 

<body> 

    <form id="form1" runat="server">        <div> 

            <asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/XMLFile1.xml" 

Width="150px"  Height="150px" />        

 </div>   

 </form>

</body>

</html> 

XMLFile1.xml 

<?xml version="1.0" encoding="utf-8" ?> 

<Advertisements> 

  <Ad> 

    <ImageUrl>~\Images\My Fhotos.png</ImageUrl> 

    <NavigateUrl>http:\\www.rupamsolutions.com</NavigateUrl> 

    <AlternateText> No Image</AlternateText> 

   <Impression>2</Impression> 

    <Keyword>Pic</Keyword> 

  </Ad> 

  <Ad> 

  <ImageUrl>~\Images\Uttam.png</ImageUrl> 

  <NavigateUrl>http:\\www.rupamsolutions.com</NavigateUrl> 

  <AlternateText> No Image</AlternateText> 

  <Impression>2</Impression> 

  <Keyword>Pic</Keyword> 

  </Ad> 

</Advertisements> 

Output:-




Post a Comment

0 Comments