private string _StyleClass;
public string StyleClass
{
get { return _StyleClass; }
set { _StyleClass = value; }
}
private void StyleForm()
{
HtmlForm Form1 = this.FindControl("form1") as HtmlForm;
Form1.Attributes.Add("class", _StyleClass);
}
protected override void OnPreRender(EventArgs e)
{
//控件呈现调用方法
StyleForm();
base.OnPreRender(e);
}