Literal Content in Skin File?
Posted: 11/20/06 2:16 PM
Today I got a rather annoying and unhelpful error. I was trying to skin a custom control using an ASP.NET 2.0 .skin file. I got this error:
Literal content ('<control:AControl Color="White" />') is not allowed
within a ‘skin file’.
<control:AControl color="White">
And then it proceeded to highlight the control declaration in the skin file:
<%@ Register Assembly="Controls" Namespace="Controls" TagPrefix="control" %>
<control:AControl Color="White" />
Solution? The control doesn’t have a runat="server" attribute. Not the best error message...