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...

Filed Under: ASP.NET

Comments: 0

Comments

Something To Say?

Name: (optional)
Email: (optional, and will not be displayed)
Website: (optional)
Comment:

You can use html tags like <b>, <a>, and <p>. Actually, you can use just about anything. If you want to see what it will look like, click the preview comment button below.