Controls contain code blocks (I .e.), so you cannot modify the control set (in user-defined controls)

Source: Internet
Author: User

One problem has been depressing for more than two hours, that is, there is a head in a page but it is marked as runat = "server", and

Placeholder loads one of my custom controls. As a result, the control always reports this error: the control contains a code block (that is, <%... %>), so the control set cannot be modified,

I found the online post. In fact, the first post should be able to solve the problem, that is, there cannot be something like <%> In runat, or this error will be reported because

I put it on the parent container page, but I never saw it, and thought it was a JS place where I used <%>. I thought it was wrong to bind the control in the gridview. It hurts so much for me !!!!

 

<Link id = "cssid" href = "/style/<% = session [" cssskin "] %>/CSS/style.css" type = "text/CSS"

Rel = "stylesheet" Media = "all"/>
<Link id = "lkframework" href = "/style/<% = session [" cssskin "] %>/CSS/framework.css" type = "text/CSS"

Rel = "stylesheet" Media = "all"/>

 

Drag these two lines to the body. Do not place them in a code block with head runat = server. Otherwise, this error will be reported.

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.