Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Error - The Controls collection cannot be modified because the control contains code blocksError - The Controls collection cannot be modified because the control contains code blocks
Previous
 
Next
New Post
6/11/2009 11:08 AM
 

Running into a very strange situation.

Fresh, clean install of DNN 4.9.4. We haev tried this with regular install package and source package.

All we did was install DNN, go through the install wizard, and upload our skin package.

We can apply the skin to the home page (the first page of the web site created by DNN). But any other pages we manually add we cannot apply the skin. We get this error:

An error has occurred.
DotNetNuke.Services.Exceptions.PageLoadException: The Controls collection cannot be modified because the control contains code blocks (i.e. ). ---> System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. ). at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.UI.Skins.Skin.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.UserControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at DotNetNuke.Framework.DefaultPage.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Page.OnInit(EventArgs e) at DotNetNuke.Framework.PageBase.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

We figure if it's something wrong with the skin files, it should not even load on the home page. But it does but not on the pages we add after the home page.

We have uninstalled the DNN couple times and reinstalled thinking it may be a database corruption. But, no go.

Thanks in advance for any help.

-michael

 
New Post
6/11/2009 5:13 PM
 

Could you post the skins ASCX content?

 
New Post
6/15/2009 9:50 AM
 

Thanks, Timo. Here is it in all of its copy and paste glory.

-michael

<%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
<div class="top">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50">&nbsp;
   </td>
  </tr>
  <tr>
    <td height="125">&nbsp;</td>
  </tr>
  <tr>
    <td height="243" align="center" valign="middle"><table width="857" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td bgcolor="#A78D72"><img src="<%= SkinPath %>Images/Banner-Casino.jpg" width="857" height="248"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="857" border="0" align="center" cellpadding="10" cellspacing="0">
      <tr align="center" valign="middle" bgcolor="#A78D72" class="header">
        <td width="123"><a href="http://rc-0serv/public/Home/Casino/tabid/58/Default.aspx">Casino</a></td>
        <td width="122"><a href="http://rc-0serv/public/Home/Hotel/tabid/59/Default.aspx">Hotel</a></td>
        <td width="122"><a href="http://rc-0serv/public/Home/Events/tabid/60/Default.aspx">Events</a></td>
        <td width="123"><a href="http://rc-0serv/public/Home/Golf/tabid/61/Default.aspx">Golf</a></td>
        <td width="122" bgcolor="#A78D72"><a href="http://rc-0serv/public/Home/Dining/tabid/62/Default.aspx">Dining</a></td>
        <td width="122"><a href="http://rc-0serv/public/Home/Spa/tabid/63/Default.aspx">Spa</a></td>
        <td width="123"><a href="http://rc-0serv/public/Home/Shopping/tabid/64/Default.aspx">Shopping</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="0"><table width="857" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr background="Images/BlackDot.gif">
        <td height="1" colspan="7" align="center" valign="top"><img src="<%= SkinPath %>Images/BlackDot.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td width="1" align="center" valign="top" background="<%= SkinPath %>Images/BlackDot.gif"><img src="<%= SkinPath %>Images/BlackDot.gif" width="1" height="1"></td>
        <td width="284" height="284" align="center" valign="middle"><table width="260" height="260" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td id="LeftPane" align="center" valign="middle"></td>
          </tr>
        </table></td>
        <td width="1" align="center" valign="top" background="<%= SkinPath %>Images/BlackDot.gif"><img src="<%= SkinPath %>Images/BlackDot.gif" width="1" height="1"></td>
        <td width="285" align="center" valign="middle"><table width="260" height="260" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td id="MiddlePane" align="center" valign="middle"></td>
          </tr>
        </table></td>
        <td width="1" align="center" valign="top" background="<%= SkinPath %>Images/BlackDot.gif"><img src="<%= SkinPath %>Images/BlackDot.gif" width="1" height="1"></td>
        <td width="284" align="center" valign="middle"><table width="260" height="260" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td id="RightPane" align="center" valign="middle"></td>
          </tr>
        </table></td>
        <td width="1" align="center" valign="top" background="<%= SkinPath %>Images/BlackDot.gif"><img src="<%= SkinPath %>Images/BlackDot.gif" width="1" height="1"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td><div align="center"><img src="<%= SkinPath %>Images/R.gif" width="877" height="100"></div></td>
  </tr>
</table>
</div>

<div class="bottom">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="162" class="footer">
  <li class="footer"><a href="http://rc-0serv/public/Home/tabid/38/Default.aspx">Home</a></li>
  <li class="footer"><a href="http://rcsmsworld.riversidecasinoandresort.com/smsworld/wc.dll?smsworld%7Eavailbox" target="_blank">Hotel Reservations</a></li>
  <li class="footer"><a href="http://tickets.riversidecasinoandresort.com/" target="_blank">Event Tickets</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/Employment/tabid/65/Default.aspx">Employment</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/Directions/tabid/66/Default.aspx">Directions</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/Privacy/tabid/67/Default.aspx">Privacy</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/AboutUs/tabid/68/Default.aspx">About Us</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/ContactUs/tabid/69/Default.aspx">Contact Us</a></li>
 </td>
  </tr>
  <tr>
    <td height="80" class="copyright">Copyright 2009 Riverside Casino and Golf Resort. All Rights Reserved.<br>
      Bet with your head, not over it. NEED HELP? Call 1-800-BETS-OFF. <a href="http://www.1800betsoff.org" target="_blank" style="color:#FFFFFF">www.1800betsoff.org</a> | <a href="http://www.iowa.gov/irgc" target="_blank" style="color:#FFFFFF">Iowa Racing and Gaming</a> </td>
  </tr>
</table>
</div>

 

 
New Post
6/15/2009 10:02 AM
 

And here is the original HTML file -

<div class="top">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50">&nbsp;
   </td>
  </tr>
  <tr>
    <td height="125">&nbsp;</td>
  </tr>
  <tr>
    <td height="243" align="center" valign="middle"><table width="857" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td bgcolor="#A78D72"><img src="Images/Banner-Casino.jpg" width="857" height="248"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="857" border="0" align="center" cellpadding="10" cellspacing="0">
      <tr align="center" valign="middle" bgcolor="#A78D72" class="header">
        <td width="123"><a href="http://rc-0serv/public/Home/Casino/tabid/58/Default.aspx">Casino</a></td>
        <td width="122"><a href="http://rc-0serv/public/Home/Hotel/tabid/59/Default.aspx">Hotel</a></td>
        <td width="122"><a href="http://rc-0serv/public/Home/Events/tabid/60/Default.aspx">Events</a></td>
        <td width="123"><a href="http://rc-0serv/public/Home/Golf/tabid/61/Default.aspx">Golf</a></td>
        <td width="122" bgcolor="#A78D72"><a href="http://rc-0serv/public/Home/Dining/tabid/62/Default.aspx">Dining</a></td>
        <td width="122"><a href="http://rc-0serv/public/Home/Spa/tabid/63/Default.aspx">Spa</a></td>
        <td width="123"><a href="http://rc-0serv/public/Home/Shopping/tabid/64/Default.aspx">Shopping</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="0"><table width="857" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr background="Images/BlackDot.gif">
        <td height="1" colspan="7" align="center" valign="top"><img src="Images/BlackDot.gif" width="1" height="1"></td>
      </tr>
      <tr>
        <td width="1" align="center" valign="top" background="Images/BlackDot.gif"><img src="Images/BlackDot.gif" width="1" height="1"></td>
        <td width="284" height="284" align="center" valign="middle"><table width="260" height="260" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td id="LeftPane" align="center" valign="middle"></td>
          </tr>
        </table></td>
        <td width="1" align="center" valign="top" background="Images/BlackDot.gif"><img src="Images/BlackDot.gif" width="1" height="1"></td>
        <td width="285" align="center" valign="middle"><table width="260" height="260" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td id="MiddlePane" align="center" valign="middle"></td>
          </tr>
        </table></td>
        <td width="1" align="center" valign="top" background="Images/BlackDot.gif"><img src="Images/BlackDot.gif" width="1" height="1"></td>
        <td width="284" align="center" valign="middle"><table width="260" height="260" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td id="RightPane" align="center" valign="middle"></td>
          </tr>
        </table></td>
        <td width="1" align="center" valign="top" background="Images/BlackDot.gif"><img src="Images/BlackDot.gif" width="1" height="1"></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td><div align="center"><img src="Images/R.gif" width="877" height="100"></div></td>
  </tr>
</table>
</div>

<div class="bottom">
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="162" class="footer">
  <li class="footer"><a href="http://rc-0serv/public/Home/tabid/38/Default.aspx">Home</a></li>
  <li class="footer"><a href="http://rcsmsworld.riversidecasinoandresort.com/smsworld/wc.dll?smsworld%7Eavailbox" target="_blank">Hotel Reservations</a></li>
  <li class="footer"><a href="http://tickets.riversidecasinoandresort.com/" target="_blank">Event Tickets</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/Employment/tabid/65/Default.aspx">Employment</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/Directions/tabid/66/Default.aspx">Directions</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/Privacy/tabid/67/Default.aspx">Privacy</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/AboutUs/tabid/68/Default.aspx">About Us</a></li>
  <li class="footer"><a href="http://rc-0serv/public/Home/ContactUs/tabid/69/Default.aspx">Contact Us</a></li>
 </td>
  </tr>
  <tr>
    <td height="80" class="copyright">Copyright 2009 Riverside Casino and Golf Resort. All Rights Reserved.<br>
      Bet with your head, not over it. NEED HELP? Call 1-800-BETS-OFF. <a href="http://www.1800betsoff.org" target="_blank" style="color:#FFFFFF">www.1800betsoff.org</a> | <a href="http://www.iowa.gov/irgc" target="_blank" style="color:#FFFFFF">Iowa Racing and Gaming</a> </td>
  </tr>
</table>
</div>
 

 
New Post
6/15/2009 10:07 AM
 

And here is the associated skin.css. Thanks! -michael

a:link, a:active, a:visited {color:#4B3905; text-decoration:none;}
a:hover {color:#7C692E; text-decoration:none;}

html, body
{
 font-family: Arial, Helvetica, sans-serif;
 margin: 0px;
 border: 0px;
}

.top
{
 background: #ebd7c3 url(Images/Top.gif) no-repeat top center;
}

.header
{
 text-align: center;
 color: #FFFFFF;
 font-family: Times New Roman, Times, serif;
 font-weight: bold;
 font-size:20px;
}

header a { color: #FFFFFF; }
header a:hover { color: #FFCC99; }

.contenthome
{
 padding: 5px;
}

.content
{
 padding: 20px;
}

.bottom
{
 background: #ebd7c3 url(Images/Bottom.gif) no-repeat bottom center;
}

.footer
{
 text-align: center;
 font-size: 70%;
}

li.footer { margin:0 auto; display:inline; font-size:12px; margin:0px 5px; }

.copyright
{
 text-align: center;
 font-size: 10px;
 color: #FFFFFF;
}
 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Error - The Controls collection cannot be modified because the control contains code blocksError - The Controls collection cannot be modified because the control contains code blocks


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out