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, ...The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)
Previous
 
Next
New Post
3/6/2012 1:13 AM
 

Hi All,

I have a skin package consisting of two .ascx files, one intended for the home page and the other for inner pages.  I'm using the same image tag in both ascx files:

<img src="<%=SkinPath %>/images/sae-sn-fb.gif" border="0" />

I receive an error per the subject line when I try to view a page assigned to the Inner skin.  However, the error is not thrown on the home page.  Is this error related to the image tag, or is there some other root cause I should investigate? 

Thanks,

Sid 

 
New Post
3/6/2012 2:30 AM
 

I guess you inserted this image inside a pane?
(A div / td with runat="server")

That's not allowed in ASP.NET and causes errors like this.

 
New Post
3/6/2012 3:47 PM
 

Hi Timo,

Actually, I didn't insert the image tag inside a div with runat=server.  Here's the markup for the div container:

<div id="header-area">

<!-- Header Starts -->

<dnn:logo id="DNNLOGO" runat="server"></dnn:logo>

<a href="#" id="sn"><img src="<%=SkinPath %>/images/sae-sn-fb.gif" border="0" /></a>

<a href="#" id="sn"><img src="<%=SkinPath %>/images/sae-sn-twitter.gif" border="0" /></a>

<!-- Header Ends -->

</div>

The error on site can be viewed here

Thanks,

Sid

 
New Post
3/6/2012 4:02 PM
 
is there any associated error in the DNN event log?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/6/2012 4:09 PM
 

Hi Sebastian,

Yes, here's the output of the event log entry:

AssemblyVersion: 5.6.7
PortalID: 0
PortalName: VGN2
UserID: -1
UserName:
ActiveTabID: 225
ActiveTabName: Alumni
RawURL: /Alumni.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.dotnetnuke.com/Resources/Forums/forumid/109/postid/449325/scope/posts.aspx
UserAgent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: c242bcdf-1afe-4f0a-8649-ccfe88265ab8
InnerException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.UI.ControlCollection.Add
StackTrace:
Message: 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.ProcessMasterModules() at DotNetNuke.UI.Skins.Skin.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 ---
Source:
Server Name: DELLTRAVAN

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)


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