ajax javascript error, break point points to the view state?

I have an aspx page that is getting an Object Expected javascript error on submit, but when you break into the error the breakpoint is somewhere in the middle of the __VIEWSTATE input html element.A javascript stack dump shows just “anonymous(null)”.What does this mean and how does one go about debugging further?………………

via Asp.Net Developed Tutorials » Search Results » ajax:

ajax javascript error, break point points to the view state?

I have an aspx page that is getting an Object Expected javascript error on submit, but when you break into the error the breakpoint is somewhere in the middle of the __VIEWSTATE input html element.
A javascript stack dump shows just “anonymous(null)”.
What does this mean and how does one go about debugging further?
………………………..

This usually means that during the loading of your page, you are calling a javascript method which is not present or loaded in that page. First you need to ensure all the methods called during loading of your page is available and then you can check if those calls are made before methods are getting loaded.
Not sure if this helps, but try debugging using the firebug in firefox. You might even hit on the javascript method which is being called
………………………..

Try to use chrome for debugging js, i used to see such errors when debugging in ie8
………………………..

Finally found the culprit. Somone checked in a change to the submit button on the form, it went from:
onclick=”btnSubmit_Click” />To:
**onClientClick=”doSomeUnrelatedCleanup();return true;”**
onclick=”btnSubmit_Click” />Then when asp.net parses the page it adds
WebForm_DoPostBackWithOptions(….)To the end of the onClientClick attribute, except now because of the return true, it never executed the Web Forms post back call.

For more info: ajax javascript error, break point points to the view state?

Asp.Net Developed Tutorials » Search Results » ajax

ajax javascript error, break point points to the view state?

Share this post:

Related Posts

Leave a Comment