Telerik RadCodeBlock vs RadScriptBlock

by Gregg Crystal Aug 22, 2012

With any webforms app, there's a couple of issues when you're trying to get .NET controls IDs into Javascript. It works best when you have javascript on the same aspx page as the controls you're using, although not the ideal solution because external JS files are so much nicer. I found a nice link that explains how to do this by registering the javascript files, but I've since lost it and will have to find it again.

When working with Telerik controls and using the Telerik tags RadCodeBlock and RadScriptBlock, you have some of the same considerations.

RadCodeBlock is used when you will have javascript code that has <%= tags within the code.

If you have none of these tags, use RadScriptBlock.

Telerik RadCodeBlock vs RadScriptBlock

Ready to Supercharge Your Sitefinity Project?