JScript Exception in AJAX Control Toolkit

January 21st, 2008 by kwong

I ran across an exception "Microsoft JScript runtime error: ‘this._postBackSettings.async’ is null or not an object" the other day while writing some AJAX code with .Net AJAX Extensions for .Net framework 2.0.

The page I was developing was simply enough, basically, it just consists of a button and a textbox inside an update panel. Doing a search on the error turned out quite a few matches, and it seems that a lot of people are having the same issue.

After reading a couple of posts, I realized that the reasons given were either incorrect (i.e. did not solve the issue I had) or pretty vague. So, after carefully looking through the exception path within the JScript library, I realized that this might have been caused by the fact that the page does not have a default submit button.

So here is the solution:

Add an asp panel  around the submit button and the textbox, and set the DefaultButton property to the submit button. Now the the submit button should be working without triggering the JScript exception mentioned earlier.

    <asp:Panel ID="Panel1" runat="server"  DefaultButton="BtnSubmit">

 

Posted in Software |

6 Responses

  1. Mark Says:

    Thanks for the tip Kerry! This error had been driving me crazy, and you suggestion helped me resolve the problem.

  2. Craig Says:

    Me too!! Thanks so much.

  3. Margot Says:

    THANK YOU! Also past the point of crazy. My problem revolves around a text box only, no other controls, so I added a panel and a button and gave the button the following CssClass:
    .invisibleButton { visibility:hidden; }

    It’s so frustrating this has not been addressed yet (as far as I can tell)!

  4. Sudhir Tibrewal Says:

    Thanks Kerry, your post really helped. But unable to understand the cause.

  5. Oli Pyke Says:

    That worked for me too. Thank you.

  6. Deepak Gupta Says:

    I didn’t get the exact problem. What actually causing this problem. Though I am able to fix this but what is the issue. I think if we can figure this out we may come onto the good solution for this error.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.