Monday, April 6, 2009

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

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

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title>Untitled Page</title>

<link href="<%= Page.ResolveUrl("~")%>default.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="<%= Page.ResolveUrl("~")%>cssverticalmenu.css" />

<script type="text/javascript" src="<%= Page.ResolveUrl("~")%>cssverticalmenu.js"></script>

</

head>

<

body>
Solution: Put your javascript tag after </head>
 

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title>Untitled Page</title>

</

head>

<link href="<%= Page.ResolveUrl("~")%>default.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="<%= Page.ResolveUrl("~")%>cssverticalmenu.css" />

<script type="text/javascript" src="<%= Page.ResolveUrl("~")%>cssverticalmenu.js"></script>

<

body>
 

 

No comments: