Click here to Skip to main content
15,924,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements >
    <Ad >
        <ImageUrl>~/Image/Bluehills.jpg </ImageUrl>
        <AlternateText>Childhood</AlternateText>
        <Impressions>1</Impressions>
    </Ad>
    <Ad >
        <ImageUrl> ~/Image/Sunset.jpg </ImageUrl>
        <AlternateText>Beak</AlternateText>
        <Impressions>1</Impressions>
    </Ad>
    <Ad >
        <ImageUrl> ~/Image/Waterlilies.jpg </ImageUrl>
        <AlternateText>Bird</AlternateText>
        <Impressions>1</Impressions>
    </Ad>
    <Ad >
        <ImageUrl> ~/Image/Winter.jpg </ImageUrl>
        <AlternateText>Circle And Square</AlternateText>
        <Impressions>1</Impressions>
    </Ad>

</Advertisements>


VB
<asp:AdRotator ID="AdRotator1" runat="server"
            AdvertisementFile="~/xml/XMLAdrotator.xml" Height="200px" Width="300px" />



Please provide me with suggestion why images are not showing up?
Posted

There may be a path problem.

OR

Add an XmlDataSource and then, set DataSourceID of AdRotator to that XmlDataSource.
eg:
 <asp:xmldatasource id="XmlDataSource1" runat="server" datafile="~/xml/XMLAdRotator.xml" />
<asp:adrotator id="AdRotator1" runat="server" DataSourceID="XmlDataSource1" Style="position: static" Width="170px" Height="106px" />

In this way, you can set the XmlDataSource as dataSource for as many AdRotators as you want.
 
Share this answer
 
v3
Hi,
At imageurl tag use Resolved image URL path, i.e. "http://mysite.com/Image/Bluehills.jpg".Hope this will solve your issue.
 
Share this answer
 
v3
Hi.... my
XML
<ImageUrl>~/Image/Bluehills.jpg </ImageUrl>
tag contains space before . That created the problem. Now everything is ok. Thanks to all
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900