Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Weird error - Literal content is not allowed within a 'skin file'

Reply
Thread Tools

Weird error - Literal content is not allowed within a 'skin file'

 
 
Alan Silver
Guest
Posts: n/a
 
      01-26-2006
Hello,

I am just converting a 1.1 web site to use version 2.0 of the framework
and have run into a weird problem trying to add a skin file.

I set up a theme, and moved the CSS file in there, no problem. I then
changed one of the <img> tags in the master page to look like...

<asp:Image ID="imgBsd" SkinId="imgBsd" runat="server" />

I created a skin file in the theme folder, and added the following...

<asp:Image SkinId="imgBsd" Imageurl="images/bsd.gif" border="0"
width="26" height="12" AlternateText="" />

When I try to run the page, I get the following error...

Literal content ('<asp:Image SkinId="imgBsd" Imageurl="images/bsd.gif"
border="0" width="26" height="12" AlternateText="" />') is not allowed
within a 'skin file'.
D:\WebSites\NewSite\App_Themes\Orange\Default.skin 1

Anyone able to explain this? I have used skin files before and had
similar content without error. I even tried copying in some content from
a skin file on another site (that works fine), but got the same error.

Any help appreciated. TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
 
Alan Silver
Guest
Posts: n/a
 
      01-26-2006
>I am just converting a 1.1 web site to use version 2.0 of the framework
>and have run into a weird problem trying to add a skin file.


And just after posting I came across the answer... I forgot to add the
runat="server" attribute!! Grr!! It would have been helpful if
intellisense had worked in skin files. It seems you are completely on
your own. You don't even get the toolbox to drag control definitions in.

Let this be a warning to anyone who comes across the same problem!!

--
Alan Silver
(anything added below this line is nothing to do with me)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Literal content is not allowed within a UserControl Ahsan Umair ASP .Net Web Controls 1 07-17-2008 10:09 PM
Literal content is not allowed within a CustomControl? Dave ASP .Net Building Controls 2 08-02-2006 07:45 PM
ERROR: Literal content ('<asp:ListItem Selected="') is not allowed within a 'System.Web.UI.WebControls.ListItemCollection' (REPOST) John Smith ASP .Net 0 06-07-2006 07:24 AM
Literal content ('<asp:ListItem Selected="') is not allowed within a 'System.Web.UI.WebControls.ListItemCollection' John Smith ASP .Net 0 06-06-2006 07:58 AM
"Literal content is not allowed within a user control"? =?Utf-8?B?RGF2ZQ==?= ASP .Net 0 05-17-2004 03:21 AM



Advertisments