WebForm_InitCallback is not defined

This error eventually pops up, if you use the AjaxControlToolkit Rating Control. The Rating Control just doesn’t work, nothing happens when you click on it or hover over it. You find a couple of threads about it in Google but none of them helped me. I completly rewrote my web.config, removed all HttpModules, checked my Rewrite Logic for possible .axd lockups and nothing helped. That’s the exact error:

WebForm_InitCallback is not defined
Vote.aspx
Line 226

Line 226 says WebForm_InitCallback();Sys.Application.initialize();.

After wasting about 4 hours I checked out the CSS definitions which are being used by the Rating Control:

 StarCssClass="ratingStar"
                    WaitingStarCssClass="waitRatingStar"
                    FilledStarCssClass="filledRatingStar"
                    EmptyStarCssClass="emptyRatingStar"  

I checked the path to the images set in those 3 CSS definitions and noticed that waitRatingStar was pointing to an invalid path - a non existing image. After fixing that path the error was gone!

Like so many times a trivial fault can cost you lots of time - and the error which is being thrown by this fault unfortunately really doesn’t point you into the direction of a missing image. Hopefully this saves someone else searching time on this ;).

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment