views:

508

answers:

2

I have created a usercontrol (a custom button control), how to apply skin on that control. What to write in the skin file for eg for a asp:button i will write <asp:button SkinID ="btnSkinBlue" runat = "server"/>.

What to write for a user control?

+1  A: 

I haven't used skins with web custom controls, but I expect it to work like:

Ont the aspx:

<yourTag:CustomButton SkinID ="btnSkinBlue" runat = "server"/>

On the skin file:

<yourTag:CustomButton SkinID ="btnSkinBlue" runat = "server" CssClass="someclass" />

In the skin file, for defaults:

<yourTag:CustomButton runat = "server" CssClass="defaultClass" />
eglasius
with the above stuff you also requires Register tag "<%@ Register Src="../../UserControls/RoundedButton.ascx" TagName="RoundedButton" TagPrefix="ttl" %>"
Miral
@Miral yes, as you do in any aspx page :)
eglasius
A: 

We require register tag <%@ Register Src="../../UserControls/RoundedButton.ascx" TagName="RoundedButton" TagPrefix="ttl" %>

Miral