शनिवार, 13 जून 2009

Recaptcha Validation Exception: Microsoft JScript runtime error: 'WebForm_PostBackOptions' is undefined

I'm using recaptcha control for avoid spamming while signing-up.
I get the following error:
Microsoft JScript runtime error: 'WebForm_PostBackOptions' is undefined

If I remove the recaptcha, the form works. I've read some posts that the WebResources.axd which handles the 2.0 javascript isn't being downloaded properly etc. I checked my solution file for other forms, I see "WebResources.axd" is loaded properly & while the page which contains recaptcha does not load "WebResources.axd" file. I googled a lot, applied all the steps given in the blogs related to this error, but nothing fixed it. This situation was show stopper for me and I needed this is be fixed. Whenever I removed recaptcha it started working. I knew the problem but did not find solution.

Unknowingly I added "ValidationGroup="abc" for the control on which click I was getting the above exceptions.

I didnt realize that my problem was solved. Suddenly I found, my exceptions has stopped, I compared my old code with the current one & found the solution is adding ValidationGroup="abc". I added for all the control on which click the error was coming.

If you get the similar error, just try this work around. I still wonder how it solved the problem. Any explaination is welcome.

Regards,
Taruna

कोई टिप्पणी नहीं: