我在这样的页面的代码隐藏中创建一个文本框:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
TextBox test = new TextBox();
test.SkinkId = "MySkin";
placeHolder.Controls.Add(test);
}
在我的皮肤文件中,我有这个:
<asp:TextBox
runat="server"
SkinId = "MySkin"
Width="400"
/>
为什么皮肤没有应用于控件。如果我在我的 aspx 页面中声明控件,它可以正常工作,但如果我尝试以编程方式执行它,它就不起作用。