4

This is perhaps related to this question, but I have slightly more information.

I recently updated an ASP.Net application to .NET 3.5 after coding a few new pieces with Linq. Now my pages intermittently stop firing event handlers. I have it narrowed down to pages with Ajax on them, and I assume it's either the ScriptManager or the AjaxControlToolkit registration that is precipitating the problem.

The really screwy part is that pages seem to work fine about 2/3s of the time, and the controls lose their event handlers only 1/3 of the time. I wondered about some type of error occurring and the page not rendering correctly, but I cannot find evidence of this.

Community
  • 1
  • 1
nathaniel
  • 1,135
  • 2
  • 8
  • 20

7 Answers7

1

We were have exactly this issue and as you have said it was only happening some of the time and only on pages with Ajax requests. We found that disabling the HTTP Keep-Alive as suggested in the answer to Why does Internet Explorer not send HTTP post body on Ajax call after failure? worked.

This can be done in IIS7 by following the instructions in How to configure HTTP KEEP-ALIVE in IIS 7

Community
  • 1
  • 1
bstoney
  • 6,594
  • 5
  • 44
  • 51
0

In my case none of the events (either button or check box) were firing. I was able to overcome by this problem using following way.

In my master page I had closed a tag referring to an external .js file with /> notation instead of <script></script>.

for Ex: chanage <script src='../../Scripts/common/menu.Js' type='text/javascript' /> to <script src='../../Scripts/common/menu.Js' type='text/javascript' ></script>

Hope this will help you, Ramesh

Tariqulazam
  • 4,535
  • 1
  • 34
  • 42
0

Try commenting out Update panel if any. Then try to click button there must be some error on the page. I've also faced similar issues.

Sandor Drieënhuizen
  • 6,310
  • 5
  • 37
  • 80
Mohan
  • 907
  • 5
  • 22
  • 45
0

i have only used Telerik Ajax controls so far, and my observation is if an exception occours in a Ajax enabled control, nothing happens. No exception report, no action. nothing.

Maybe you should test you app without ajax to identify any problem spots

Midhat
  • 17,454
  • 22
  • 87
  • 114
  • No errors -- if i remove the AJAX pieces everything works appropriately. And like I mentioned, about 66% of the time it works appropriately AS IS, with the Ajax libraries still in the markup. – nathaniel Apr 24 '09 at 16:20
0

My initial thought would be that something is happening where the javascript is erroring out (un-caught) and aborting the async postback.

If you can get this to happen in a development environment, you might want to try error handling the window.onerror event and throwing some alert boxes up. It might help to see where possible errors occur.

hacker
  • 1,115
  • 1
  • 15
  • 28
0

It's seem to me, you have issue with Update Panel.

Define the following properties of Update Panel if you are using more than one update panel and updation of one panel change the data of other update panel.

For the UpdatePanel

  1. ChildrenAsTriggers = true
  2. EnableViewState = true (if you are using this feature)
  3. UpdateMode = Always

Use the same properties for other update panel in your same page.

If you find it useful, please mark it as your answer else let me know....

0

have you tried:

ScriptManager.GetCurrent(this).RegisterAsyncPostBackControl(yourButton);

Iralda Mitro
  • 7,190
  • 5
  • 24
  • 29