Search code examples
asp.netthemesskin

Asp.Net - Apply a Skin to a Button inside a Custom User Control


I use Asp.Net 4 and C#.

In my web site I have a Theme Folder with a Skin file to changing the aspects of all my Button in my website.

All is working fine except styling for a Button inside a User Control.

Do you have an idea how to apply the skin file even to the Button inside the User Control? Thanks for your help!

SKIN FILE:

<asp:Button runat="server" ForeColor="#ffffff" BackColor="#627AAD" Font-Bold="True" BorderColor="#000000" BorderWidth="1px"/>

ON .ASPX:

<%@ Register Src="~/UploadImageColorPicker.ascx"
    TagName="UploadImageColorPicker" TagPrefix="cms" %>
<cms:UploadImageColorPicker ID="uxUploadImageColorPicker" runat="server" />

Solution

  • You need to set Theme="ThemeName" at page directive in which you have add add user control