Controls contain code blocks (I .e.), so you cannot modify the control set for exception handling.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.