7 Replies - 1628 Views - Last Post: 04 May 2014 - 04:00 PM Rate Topic: -----

#1 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 12:53 PM

Hello,
I get an error message saying
Server Error in '/' Application. The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

I've tried commenting everything in my codebehind and in the asp:Content tag but i still get the error. I've been googling and everyone says to take javascript out of the header and put it into the body? not sure what that means. everything i've tried produces an error

Here's a 3 window screenshot

any help would be greatly appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: The Controls collection cannot be modified because the control contain

#2 TgaJava  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 71
  • Joined: 28-April 14

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 01:38 PM

What are you trying to do? You didn't specify your purpose as well as your effort towards it(rather than just goggling)

Instead of using a that big screen shot, it would be more readable if you post your code using the code tags and your pictures using the image tag.


one common solution is surrounding your java-script code with a tags like div placeholder or as you said moving it out of the head section.

if you don't know what a java-script means then you should get a basic HTML/web programming tutorial. Simply a java-script begins with something like the script tag so look for it and move the whole tag
<script ...>.

...
...
</script>




(+)(+)
Was This Post Helpful? 0
  • +
  • -

#3 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 01:54 PM

it turns out, all of my auto-generated aspx pages are behaving the same way now, so i assume something is messed up in the site.master page? i've tried moving around what looks like it might have javascript in it(yes i'm in the process of taking several tutorials (asp.net, javascript, razor) and i've run into speed bumps.

<head runat="server">
    <meta charset="utf-8" />
    <title><%: Page.Title %> - My ASP.NET Application</title>
    <asp:PlaceHolder runat="server">     
          <%: Scripts.Render("~/bundles/modernizr") %>
    </asp:PlaceHolder>  
    <webopt:BundleReference runat="server" Path="~/Content/css" /> 
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    <asp:ContentPlaceHolder runat="server" ID="HeadContent" />
</head>

Was This Post Helpful? 0
  • +
  • -

#4 TgaJava  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 71
  • Joined: 28-April 14

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 02:07 PM

so what result did you get now, and for sure you have check your master page because all other pages depend on it.
Was This Post Helpful? 0
  • +
  • -

#5 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 02:23 PM

same result
Was This Post Helpful? 0
  • +
  • -

#6 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 02:41 PM

just created a new ASP.NET forms website and the master pages are identical. i'm starting to think that Brew and Juice ui are the culprits. I'll get rid of them and not do anything fancy until i know more about what it is i'm actually doing
Was This Post Helpful? 0
  • +
  • -

#7 TgaJava  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 71
  • Joined: 28-April 14

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 02:56 PM

Really, I still couldn't a big picture of your work, so I can say anything, just keep on trying everything that is appropriate and lets wait if others can understand your work and comment

Really, I still couldn't get a big picture of your work, so I can say anything, just keep on trying everything that is appropriate and lets wait if others can understand your work and comment
Was This Post Helpful? 0
  • +
  • -

#8 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

Re: The Controls collection cannot be modified because the control contain

Posted 04 May 2014 - 04:00 PM

View PostTgaJava, on 04 May 2014 - 03:56 PM, said:

Really, I still couldn't a big picture of your work, so I can say anything, just keep on trying everything that is appropriate and lets wait if others can understand your work and comment

I appreciate your attempt to help. I've just decided to get rid of juiceui and brew all together and just try to start a new one.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1