AdRotate Control in Asp.net — AdRotate Control in Asp.net , ASP.Net — ASP.Net Example
ASP.Net Example-AdRotate Control in Asp.net

Tuesday, December 14, 2010

AdRotate Control in Asp.net

For AdRotate Control one xml file add
/* XMLFile.xml file */
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
  <Ad>
    <ImageUrl>~/Upload/button_half_small_hover.gif</ImageUrl>
    <NavigateUrl>http://www.Asp13.blogspot.com</NavigateUrl>
  </Ad>
  <Ad>
    <ImageUrl>~/Upload/tfile-m.jpg</ImageUrl>
    <NavigateUrl>http://www.Google.com</NavigateUrl>
  </Ad>
</Advertisements>
In thia file all Tags are Default Do not Chage it. otherwise it will not work.

/*  Home.aspx */

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:adrotator ID="Adrotator1" runat="server"  AdvertisementFile="~/XMLFile.xml"></asp:adrotator>
    </div>
    </form>
</body>
</html>

No comments:

Post a Comment

ASPdotNET-Example