本篇文章為大家展示了asp.net中怎么實(shí)現(xiàn)頁面換膚功能,內(nèi)容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細(xì)介紹希望你能有所收獲。
具體如下:
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) { //控件呈現(xiàn)調(diào)用方法 StyleForm(); base.OnPreRender(e); }
上述內(nèi)容就是asp.net中怎么實(shí)現(xiàn)頁面換膚功能,你們學(xué)到知識或技能了嗎?如果還想學(xué)到更多技能或者豐富自己的知識儲備,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。