Jump to content

Asp.net 2.0 - Adrotator Control


johnzette
 Share

Recommended Posts

Source View:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><!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>AdRotator Control</title></head><body> <form id="form1" runat="server"> <div> <asp:AdRotator ID="AdRotator1" runat="server" AdvertisementFile="~/App_Data/Ads.xml" Style="z-index: 100; left: 9px; position: absolute; top: 10px" /> </div> </form></body></html>XML File:<?xml version="1.0" encoding="utf-8" ?><Advertistments> <Ad> <ImageUrl>~/Images/cbtnuggets.gif</ImageUrl> <NavigateUrl>http://www.link1.com</NavigateUrl> <AlternateText>Link 1 Homepage</AlternateText> <Impressions>50</Impressions> <Keyword>Link 1</Keyword> </Ad> <Ad> <ImageUrl>~/Images/logo_black_gold.gif</ImageUrl> <NavigateUrl>http://www.link2.com</NavigateUrl> <AlternateText>Link 2 Homepage</AlternateText> <Impressions>75</Impressions> <Keyword>Link 2</Keyword> </Ad></Advertistments>My Problem:I set the AdvertistmentFile Property of AdRotator1 to my xml file, my problem is when i run the code the error is: The AdRotator AdRotator1 could not find the AdvertisementFile or the file is invalid.IDE i used is VS 2005

Edited by johnzette
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...