Hi Boris,
Yes, it is best practise to wrap all the JavaScript into RadCodeBlock control in order to avoid the mentioned error. Also please note that the RadCodeBlock should be used not only in case Javascript is added but for every server tag you have placed in the page markup.
Regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their
blog feed now.