JavaScript Function Error on .aspx page C#

Asked By 20 points N/A Posted on -
qa-featured

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. <% … %>).

SHARE
Answered By 0 points N/A #113809

JavaScript Function Error on .aspx page C#

qa-featured

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#

 

Related Questions