1
Self-closing tag cannot have child controls error on Mon Feb 13, 2012 2:07 am
Hi! I'm trying to user StyleManager cause а it's interesting feature with constants templating in ny project.
But I already have been added some Telerik controls to it. So now I recieve such an error message:
Some part of error message is in russian because of my localization of .net framework installation. But there is a usual Server error in application error caused by unhandled exception.
Here is my aspx page's Code:
When I change value of property RenderCssOnPage to true everything works perfect
ps urls in page's code are changed due to forum's policy for new members
But I already have been added some Telerik controls to it. So now I recieve such an error message:
- Code:
Ошибка сервера в приложении '/'.
--------------------------------------------------------------------------------
Self-closing tag cannot have child controls
Описание: Необработанное исключение при выполнении текущего веб-запроса. Изучите трассировку стека для получения дополнительных сведений о данной ошибке и о вызвавшем ее фрагменте кода.
Сведения об исключении: System.Exception: Self-closing tag cannot have child controls
Ошибка источника:
Необработанное исключение при выполнении текущего веб-запроса. Информацию о происхождении и месте возникновения исключения можно получить, используя следующую трассировку стека исключений.
Трассировка стека:
[Exception: Self-closing tag cannot have child controls]
Grovebranch.HtmlGenericSelfClosing.get_Controls() +68
Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +105
Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +630
Telerik.Web.UI.RadFormDecorator.FindAndDecorateControls(Control parent) +630
Telerik.Web.UI.RadFormDecorator.DecorateAspNetControls() +68
Telerik.Web.UI.RadFormDecorator.ControlPreRender() +891
Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +47
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
--------------------------------------------------------------------------------
Информация о версии: Платформа Microsoft .NET Framework, версия:2.0.50727.4927; ASP.NET, версия:2.0.50727.4927
Some part of error message is in russian because of my localization of .net framework installation. But there is a usual Server error in application error caused by unhandled exception.
Here is my aspx page's Code:
- Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StyleManagerTest.aspx.cs" Inherits="Simple.Brokerage.StyleManagerTest" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register assembly="StyleManager" namespace="Grovebranch" tagprefix="gb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http : // www . w3 . org / TR / xhtml1 / DTD / xhtml1-transitional . dtd">
<html xmlns="http : // www . w3 . org / 1999 / xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server"
DecoratedControls="All" EnableAjaxSkinRendering="False" Skin="Office2007" />
<gb:StyleManager ID="StyleManager1" runat="server" RenderCssOnPage="true" >
<CssFiles>
<gb:FileReference Path=" ~ / common . css " />
</CssFiles>
<Constants>
<gb:Constant Name="bgcolor" Value="#fff" />
</Constants>
</gb:StyleManager>
<div>
<h1>Hi there</h1>
</div>
</form>
</body>
</html>
When I change value of property RenderCssOnPage to true everything works perfect
ps urls in page's code are changed due to forum's policy for new members