User-294837681 posted
Hello friends,
I have an usercontrol with a skin id
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="test.ascx.cs" Inherits="test" %>
<asp:Button SkinID="skin1" ID="btnTest" runat="server" Text="Test"/>
And i use this usercontrol in one of the pages
Test.aspx
<%@ Register Src="test.ascx" TagName="Export" TagPrefix="uc1" %>
Now I want to change the Skin of the usercontrol to "skin2" dynamically in test.aspx.cs
I tried to do it Page_PreInit as btnTest.SkinId="Skin2",
But btnTest Always was null,
I tried to do it in OnInit of the test.aspx.cs page too, but it did not help, Please let me know the possible solution ;)