I have found that skin files only work if they are placed at the root theme folder in the App_Themes folder.
For example, if you have 2 themes in the App_Themes folder, you cannot add another sub folder to the theme folder and place a seperate skin file in that subfolder.
It's not much of a limitation, but it would give you more flexibility to further customize an app.
Can anyone shed light on why this behavior occurs as it does in 2.0?
Has your skin file should have the extension .skin? I always call them theme.skin and give them the same name as the folder. Eg in Theme col2, the folder is
App_Themes\col2 and contains the css and col2.skin
Microsoft is your best reference:
Themes in ASP.Net don't provide the ability to choose from "sub-themes".
However, you can set SkinIDs in your skin files. For example, in your .skin :
<asp:DataList runat="server" SkinID="DataListColor" Width="100%">
<ItemStyle BackColor="Blue" ForeColor="Red" />
</asp:DataList>
<asp:DataList runat="server" SkinID="DataListSmall" Width="50%">
</asp:DataList>
Then, when you want to call one of them, you just specify which SkinID you want for your datalist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With