Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > weird problem with skin and masterpage with inline code

Thread Tools

weird problem with skin and masterpage with inline code
Posts: n/a

I have a weird problem. Working fine before I incoporating theme and

my sample is an aspx file using masterpage. working fine.

then when I incoporating theme and skin, keep getting error:

The Controls collection cannot be modified because the control contains
code blocks (i.e. <% ... %>).

after many trial, the error resolved if I:

at masterpage, I have a client script with inline coding to refering
the main form:

<script language="javascript" type="text/javascript">
var m_frmMain = null;

function OnFormLoad()
m_frmMain = document.<%=frmMain.ClientID%>;

if I change or disable the inline code say to : m_frmMain =

it worked fine then!!!!

Something wrong or incompatible between the theme and masterpage inline

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing a control on a masterpage that uses a second masterpage Torben Laursen ASP .Net 4 03-15-2008 03:27 AM
Masterpage change its masterpage mr t ASP .Net 0 08-29-2007 10:11 PM
MasterPages - take plain form, add MasterPage. MasterPage does NOT appear when run Randy Smith ASP .Net 9 04-14-2007 09:06 AM
MasterPage inheriting a MasterPage... is it possible? ThunderMusic ASP .Net 2 09-27-2006 07:57 PM
MasterPage -> Page -> MasterPage Code Access =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 3 04-14-2006 12:34 PM