Hi,
Does anyone know how to resolve the issue I'm experiencing with AJAX breaking the AdRotator control?
My AdRotators reside in a master page and display fine until a AJAX UpdatePanel is introduced. Once an UpdatePanel is added the AdRotators start to render their HTML output at the very beginning of the page's HTML (before the
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">in my case).
Image without AJAX problem:http://x.yougodo.com/screenshot-good.jpg
Image with AJAX problem:http://x.yougodo.com/screenshot-bad.jpg
Any help would be greatly appreciated.
Cheers
I can't seem to find any other users with your issue. You may want to give this approach a try:http://www.seesharprun.net/2007/08/09/AnAdrotatorAlternative.aspx. Where is your AdRotator located on your MasterPage? I'm assuming you are adding your UpdatePanel inside the Master's ContentTemplate?
Perhaps you can post a small snippet of code that will replicate the issue?
-Damien
Hi Damien,
Thanks for your suggestion, much appreciated - I will take a look.
Was puzzled myself why no-one else seemed to have encountered the same problem?!?
The UpdatePanel is actually located in the *.aspx page rather than the *.master - I'll try and create a small example to re-create later as everything is too intertwined in my current project to post something useful.
P.S. The Google Ads in the screenshots are not in AdRotators, only the image ads you see.
How bizarre... I've not been able to recreate problem creating a simple AJAX / master page scenario?!?
Maybe it's down to some of my non-standard controls - all pages are inherited from my own Page class that adds a bunch of extra properties and methods useful for my project. The control triggering the AJAX callback is also my own roll-your-own page number selecting control.
Quite puzzled as both these own-code-rolled controls successfully use AJAX functionality on other pages. It's jut when the AdRotator is introduced that bizarre results occur. Quite puzzled!
That's interesting that you can't reproduce it. I think your assumption may be correct with your non-standard controls. Do you perhaps have an un-closed element or something? This could be causing some issues. You also may just want to make sure your AJAX environment is setup correctly, you can refer to these common problems/fixes:http://blogs.visoftinc.com/archive/2007/09/23/asp.net-ajax--updatepanel-not-working--common-problems.aspx.
Hope you find your problem!
-Damien
Hi Damien,
Cheers once again for your help - much appreciated. Doesn't seem to be any of the issues described in the link you gave though.
Very bizarre, the output would suggest that somehow the AdRotator is getting to render it's output before the *.master or *.aspx files do?!? No html at all is output to the locations where the AdRotator is placed, only at the top of the page before all other html. Very puzzling.
I've abandoned trying to find a solution for now, coding my own temporary random ad selector for now. The AdRotators were only ever going to be a temporary measure until a fully functioning ad management system is plugged in.
Gavin.
No comments:
Post a Comment