11.4. RadCodeBlock and RadScriptBlock

In RadAjax are RadCodeBlock and RadScriptBlock, which are objects created to close the gap of interoperability between server and client scripts.

Figure 11-11 shows a typical error found when you have server code blocks inside your client-side scripts. RadCodeBlock prevents this error by isolating the code blocks, executing them, and rendering the final results along with the client scripts.

Figure 11.11. Error when having server code blocks in client-side scripts

RadScriptBlock is used to wrap client-side scripts that are inside updating areas in your web form such as a RadAjaxPanel. They are executed ...

Get Pro Telerik ASP.NET and Silverlight Controls: Master Telerik Controls for Advanced ASP.NET and Silverlight Projects now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.