This is a migrated thread and some comments may be shown as answers.

RadAjax causes multiple http get requests on postback

3 Answers 137 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
steve curtis
Top achievements
Rank 1
steve curtis asked on 26 Jun 2009, 10:13 AM
I'm trying to diagnose a problem that I'm having that is very strange and I was wondering if anyone can point me in a good direction to investigate. I have a page which contains a radajaxmanager, a combo box, a tab strip and a grid. The combo box selection updates other controls on the page via Ajax. Using Fiddler I can see that selecting a value from the combo box is creating an http post and this is followed by 2 further http get requests for the same page. The subsequent get requests aren't post backs (IsPostBack returns false) and therefore some code in the page is running when it shouldn't and this is breaking some of the functionality in the page.

This only happens in Chrome and FF3 but works okay in IE6 (in IE6 I don't get additional get requests). Additionally, it seems to be data dependant in that I only get the additional http get requets when I point my development environment at the system test database. I'm certain that the additional requests aren't being raised by some dodgy javascript.

I did wonder if this was caused by some behaviour in the Ajax Manager to try to get the browser back button to work, but EnableHistory is set to false.

Unfortuantely I'm unable to reproduce this in a snippit of code and I haven't narrowed it down to know what's causing it, I just suspect that additional http requests might be caused by something in the RadAjaxManager.

I'm using version 2009.1.527.35

Many thanks in advance for any welcome suggestions,


Steve.

3 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 30 Jun 2009, 12:15 PM
Hi Steve,

Can you disable the RadAjaxManager temporarily (EnableAJAX="false") just to ensure it is indeed the cause for the problem and see if the undesired behavior persists in that case? Also do you have a RadEditor on the page (it might be inside the Grid's edit form)? We had an issue with that control which was causing a double postback in Firefox. This issue should be fixed in the latest internal build. Let me know how it goes.

Greetings,
Pavel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
steve curtis
Top achievements
Rank 1
answered on 01 Jul 2009, 01:20 PM
Hi Pavel,

Thanks for the suggestion, I turned off the RadAjaxManager and unfortunately the problem still occurred. I also double checked that there wasn't a radEditor in the page anywhere and there wasn't. So, I tried the traditional method of stripping code out until the behaviour in the page was as I expected. There was a CollapsiblePanelExtender (part of the AjaxControlToolkit) hidden deep in a repeater, in a user control, in a tooltipmanager, in a RadPageView. By removing the CollapsiblePanelExtender, the code started working correctly.

Many thanks for your suggestion though,

Steve.
0
james
Top achievements
Rank 1
answered on 14 Sep 2011, 02:44 AM
I encountered the same problem although I was not using the RadAjax controls, the additional GET requests were specific to Chrome.

The problem was that I was manipulating an image tag's src value using javascript - I was setting the src to be blank, something like:

document.getElementById('blah').src = "";

my intention was to set the image to be no image at all.

Chrome interprets this as meaning " use the current url in the browser address bar " - in the same way that setting the src = "/images/hello.jpg" would be interpreted as "use the current url in the browser address bar and suffix /images/hello.jpg to the end" - so chrome was trying to load the actual page as an image src!

so the problem turned out to be setting an empty image src. hope this helps.
Tags
Ajax
Asked by
steve curtis
Top achievements
Rank 1
Answers by
Pavel
Telerik team
steve curtis
Top achievements
Rank 1
james
Top achievements
Rank 1
Share this question
or