 <p>Try changing &lt;%= to &lt;%# within your jQuery script. Check out <a href="http://leedumond.com/blog/the-controls-collection-cannot-be-modified-because-the-control-contains-code-blocks/" rel="nofollow noreferrer">this article</a></p>