• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Image not appearing using ad rotator

I am trying to use the adrotator control on a aspx webform.  I am using an XML file to supply the info to the contol.  The XML file is as follows:

<Advertisements>
  <Ad>
    <ImageUrl>
      ~/images/ad1.gif
    </ImageUrl>
    <NavigateUrl>
      URL
    </NavigateUrl>
    <AlternateText>
      Text
    </AlternateText>
    <Keyword>
      Keyword
    </Keyword>
    <Impressions>
      Weight
    </Impressions>
  </Ad>
</Advertisements>


The problem that i am having is that the image does not appear on the page.  The alt text, & URL appears but the images does not.  Does anybody have any idea what i am missing
?
0
Mike_Stevens
Asked:
Mike_Stevens
  • 5
  • 5
1 Solution
 
gamebitsCommented:
If you right click on the space reserved for the image to show and click property you should have the address of the image or at least where the script is looking for it, make sure the image you want to display is at that location.

Gamebits
0
 
UnexplainedWaysCommented:
Do you need the '~' in    ~/images/ad1.gif
0
 
Mike_StevensAuthor Commented:
The '~' is there.   I even tried the complete path
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
gamebitsCommented:
If you take the complete path and put in the address bar does the picture shows.

Gamebits
0
 
Mike_StevensAuthor Commented:
yes
0
 
gamebitsCommented:
One more thing, you open the page and the picture doesn't show, now look at the source code of the page, is the address in the img tag being written to the browser the way it should be?

Gamebits
0
 
Mike_StevensAuthor Commented:
This is what is shown when viewing the source

<a id="ctl00_ContentPlaceHolder1_AdRotator1" href="/domainname/
%20%20%20%20%20%20URL
%20%20%20%20" target="_top"><img src="/website folder/
%20%20%20%20%20%20ad1.gif
%20%20%20%20" alt="
      Text
    " style="border-width:0px;" /></a>
0
 
Mike_StevensAuthor Commented:
I figured it out.  The example XML file i found was showed the image as:

<ImageUrl>
images/ad1.gif
</ImageUrl>

When i changed the formatting to it works.  Must be something with the xml file format

<ImageUrl>images/ad1.gif</ImageUrl>
0
 
gamebitsCommented:
Yea! %20 is the ascii character for a blank space the way the code was written it added blank space to the url, consequently the url wasn't good anymore and the picture could not be found.

Gamebits
0
 
gamebitsCommented:
Thanks for the points and the grade.

Gamebits
0
 
Mike_StevensAuthor Commented:
Thanks for the help
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now