During the development of Web system, the CSS enhancement and beautification page style has become a standard 'process'. Develop BS systems in the Visual Studio .NET environment, you can easily set and modify the style of the control by setting the CSSClass property of the web control.
However, in the actual development process, let developers set the CSSClass attribute of the control one by one, not only cumbersome, but also easily errors, more headaches, may also cause trouble on maintenance.
The following code segment demonstrates a solution to achieving good results in practical applications, hoping to play the effect of bricking jade. Based on this idea, I believe that everyone can develop more applications, such as achieving simple SKIN features.
code show as below. The method of use is to call loadPageCSS () in each .ASPX page_load () method.
Public void loadingPagecss (system.web.ui.page vpage) {if (! vpage.ispostback) {setControlscss (vpage.controls);}}
private void SetControlsCSS (System.Web.UI.ControlCollection vControls) {for (int i = 0; i
}
Private void radiobuttonlist_css (radiobuttonlist vrdolist) {vrdolist.cssclass = "radiobuttonlist_show";