I hit this kind of nasty problems many times before and now I decided to put a few lines in here (so if I really can’t remember a thing then I might find this page by using google ;). So here is the scenario: I have custom application page (aspx page) in SharePoint 2007 (samething with WSS 3.0 or MOSS), and I use 3rd party controls in that page (Telerik RadControls for ASP.NET AJAX, any versions this far). When page that has scriptmanager and those controls loads up, it gives following error: "Script controls may not be registered before prerender". Now this is not nice error (after 2 days of debugging and hair pulling). But here is the cure for this: double check every overridden functions in your code behind file. I had only one overriden function that did not have normal "base.onprerender(e);" line. Missing that little base.X call caused that error. Now I do hope that someone finds this info useful or next time when I am struggling with this problem I might at least find my blog ;).
Btw. This info is somewhere back in the Telerik site too, but can’t remember or find original source at the moment.