Asked By
Mayer_Lim
20 points
N/A
Posted on - 08/13/2011
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. <% … %>).
Answered By
Josephm
0 points
N/A
#113809
JavaScript Function Error on .aspx page C#
Hello Mayer,
Can you share the actual code behind this page, as it will help to identify that where the problem lies.
As per the given error message, there can be a problem of using tags for writing Javascript in asp.net pages.
Check if the script is starting with
<script language="Javascript">
Add your javascript code here in between the these 2 tags.
</script>
And do specify which coding language are you using for the page. i.e. VB or C#
Â