The Coding Humanist

Literal Content in Skin File?

-- Filed Under: ASP.NET
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'.

And then it proceeded to highlight the control declaration in the skin file:

Line 1: <%@ Register Assembly="Controls" Namespace="Controls" TagPrefix="control" %>
Line 2:
Line 3: <control:AControl Color="White" />

Solution? The control doesn't have a runat="server" attribute. Not the best error message...