#region "Button CSS" public void clear(ControlCollection col) { foreach (System.Web.UI.Control item in col) { if (item == null) { return; } if (item.HasControls()) { clear(item.Controls); } else if (item is System.Web.UI.WebControls.Button) { if (((System.Web.UI.WebControls.Button)(item)).Enabled == true) { ((System.Web.UI.WebControls.Button)(item)).CssClass = "buttonDefault"; } else if (((System.Web.UI.WebControls.Button)(item)).Enabled == false) { ((System.Web.UI.WebControls.Button)(item)).CssClass = "buttonDisable"; } } } } #endregion
clear(Page.Controls);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)