how to use adrotator

B

Britney

Hi, I dragged adrotator from toolbox to the page, then I saved a xml file
(ad.xml) using following content,

<advertisements>
<Ad>
<ImageUrl>1.JPG</ImageUrl>
<NavigateUrl>http://localhost/webproject2</NavigateUrl>
<AlternateText> Home</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
</Ad>
</advertisements>


under property, I mapped advertisementfile to ad.xml, but when I compile
and run, I got an error
Do you have any ideas what I did wrong?

Server Error in '/WebProject2' Application.
 
R

Rutger Smit

Britney said:
Hi, I dragged adrotator from toolbox to the page, then I saved a xml file
(ad.xml) using following content,

<advertisements>
<Ad>
<ImageUrl>1.JPG</ImageUrl>
<NavigateUrl>http://localhost/webproject2</NavigateUrl>
<AlternateText> Home</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
</Ad>
</advertisements>


under property, I mapped advertisementfile to ad.xml, but when I compile
and run, I got an error
Do you have any ideas what I did wrong?

Server Error in '/WebProject2' Application.


Is the encoding of the xml file right (UTF-8).
To check the xml file for errors simply open it with IE. If it shows up
till the end, the xml is fine. If so... is the path to the xml file correct?

--

//Rutger

DoDotNet@KICKTHIS_Gmail.com
www.RutgerSmit.com
 
R

Rutger Smit

Britney said:
Hi, I dragged adrotator from toolbox to the page, then I saved a xml file
(ad.xml) using following content,

<advertisements>
<Ad>
<ImageUrl>1.JPG</ImageUrl>
<NavigateUrl>http://localhost/webproject2</NavigateUrl>
<AlternateText> Home</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
</Ad>
</advertisements>


under property, I mapped advertisementfile to ad.xml, but when I compile
and run, I got an error
Do you have any ideas what I did wrong?

Server Error in '/WebProject2' Application.

I see, do advertisements with a capital A.
That's how MSDN tells us to do it.

http://msdn.microsoft.com/library/e...webcontrolsadrotatorclasstopic.asp?frame=true

<Advertisements>

<Ad>
<ImageUrl>image1.jpg</ImageUrl>
<NavigateUrl>http://www.microsoft.com</NavigateUrl>
<AlternateText>Microsoft Main Site</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic1</Keyword>
</Ad>

<Ad>
<ImageUrl>image2.jpg</ImageUrl>
<NavigateUrl>http://www.wingtiptoys.com</NavigateUrl>
<AlternateText>Wing Tip Toys</AlternateText>
<Impressions>80</Impressions>
<Keyword>Topic2</Keyword>
</Ad>

</Advertisements>


--

//Rutger

DoDotNet@KICKTHIS_Gmail.com
www.RutgerSmit.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top