JavaScript Function Error on .aspx page C#

I need help in modifying a javascript for .aspx page. I do get a javascript error on my file upload javascript function. It is using document.getElementById() and then the element is passed. I don’t know what caused this error but loading of the page with the javascript and gets an error. Please see the error below for further details.

Server Error in '/' Application.
The controls collection cannot be modified because the control contains code blocks (i.e. <% … %>).
