AdRotator not working with IE8-VBForums
Results 1 to 6 of 6

Thread: AdRotator not working with IE8

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2011
    Posts
    4

    AdRotator not working with IE8

    Hello,

    I have a problem using the AdRotator control with Internet Explorer 8. It works fine with Mozilla Firefox but with IE8 neither the Ad image appear nor the NavigateURL work.Here's an example of the Ad code:

    <Ad>
    <ImageUrl>
    /Images2/googleAd.gif
    </ImageUrl>
    <NavigateUrl>
    http://www.google.com.eg/
    </NavigateUrl>
    <AlternateText>
    Ad to google home page
    </AlternateText>
    <Keyword>
    Google
    </Keyword>
    <Impressions>
    40
    </Impressions>
    </Ad>

    But again it works fine with Mozilla Firefox. I can't use the Mozilla Firefox instead, I have to use IE8 for certain reasons.

    I'm using Visual Studio 2008, VB Web application

    I appreciate your help !

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: AdRotator not working with IE8

    Moved To ASP.NET
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: AdRotator not working with IE8

    Hello Malhoosh,

    Sorry for taking so long to look at this thread.

    When you say it doesn't work, can you provide more information? Do the images simply not appear? Or are there some JavaScript errors on the page?

    In order to help you, we are going to need some more information.

    Gary

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2011
    Posts
    4

    Re: AdRotator not working

    Thank you for your reply :

    An update to the question:

    The AdRotator is not working at all neither with IE or Mozilla now. (I was testing it on a different machine)

    Here is the problem in details:


    Here's the complete xml file "MyAds.xml":

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <Advertisements>
      <Ad>
        <ImageUrl>
         ~/Images2/googleAd.gif
        </ImageUrl>
        <NavigateUrl>
          http://www.google.com.eg/
        </NavigateUrl>
        <AlternateText>
          Ad to google home page
        </AlternateText>
        <Keyword>
        Google  
        </Keyword>
        <Impressions>
        40
        </Impressions>
      </Ad>
    
      <Ad>
        <ImageUrl>
          ~/Images2/msdnAdgif
        </ImageUrl>
        <NavigateUrl>
          http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.adrotator.aspx
        </NavigateUrl>
        <AlternateText>
          Ad to an msdn page
        </AlternateText>
        <Keyword>
      Microsoft 
        </Keyword>
        <Impressions>
        40
        </Impressions>
      </Ad>
      
      
    </Advertisements>
    Here's the AdRotator itself:

    Code:
     <asp:AdRotator ID="AdRotator1" runat="server" 
                        AdvertisementFile="~/App_Data/MyAds.xml" Height="107px" Width="435px" />
    When I run the program, the result is:

    1- The image does not appear, only the Alternate text does
    2- When I click the Alternate text (having the link), : I get this message :
    Server Error in '/' Application.
    HTTP Error 400 - Bad Request.

  5. #5
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    4,218

    Re: AdRotator not working with IE8

    Hi.What i can think of is that you either have the xml wrong but i cannot help since i have never dealt with add rotator or there is something that the rotator does not like when using width and height directly.In that case try to use a css class in the addrotator(if possible).
    Slow as hell.

  6. #6
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,962

    Re: AdRotator not working with IE8

    Hello,

    I suspect that the issue that you are having is that the URL to the images is not valid. I don't think the ~ will resolve properly (i.e. to the root path) when used within the AdRotator. Try using the full URL to each of the images.

    Gary

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.