Note:An error occurred while executing the current Web request. Check the stack trace information to learn about this error andCodeDetailed information about the cause of the error.
Exception details:System. Web. httpexception: the control contains code blocks (<%... %>), so the control set cannot be modified.
Source error:
An unhandled exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception. |
Stack trace:
[Httpexception (0x80004005): controls contain code blocks (namely, <%... %>), so the control set cannot be modified.] System. Web. UI. controlcollection. Add (control child) + 2108047 Ajaxcontroltoolkit. scriptobjectbuilder. registercssreferences (Control) + 762 Ajaxcontroltoolkit. extendercontrolbase. onload (eventargs e) + 64 System. Web. UI. Control. loadrecursive () + 47 System. Web. UI. Control. loadrecursive () + 131 System. Web. UI. Control. loadrecursive () + 131 System. Web. UI. Control. loadrecursive () + 131 System. Web. UI. Control. loadrecursive () + 131 System. Web. UI. Control. loadrecursive () + 131 System. Web. UI. Page. processrequestmain (Boolean includestagesbeforeasyncpoint, Boolean includestagesafterasyncpoint) + 1436 |
"/" Application Program Server error.
Control contains code blocks (that is, <%... %>), so the control set cannot be modified.
Search and find the cause:
When you use a topic, the control contains a code block (namely, <%... %>). Therefore, you cannot modify the control set error because of the following error:
Control contains code blocks (that is, <%... %>), so the control set cannot be modified. Remove the code and implement the functions in the code.
<% =... %>
The cause of this error is that the Code similar to this is used in
Put the script <% =... %> used in the head into the body, and it will be OK.
Source: http://www.cnblogs.com/mczhu/archive/2008/08/20/1272063.html
I found that my main. Master has:
<Title> ** Management System </title>
<SCRIPT src = "<% = getserveruri () %> scripts/Main. js" type = "text/JavaScript" Language = "JavaScript"> </SCRIPT>
The above is what I transferred from the Internet,
Because I use a topic, I cannot remove the head's runat = server,
I had to put the JS Code and functions originally placed in the head part (using <%> to access background variables and resource files) to other parts of the page.
For example, you can process the footer part.