By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,637 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,637 IT Pros & Developers. It's quick & easy.

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

P: n/a
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)
Jan 26 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>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)
Jan 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.