动态设置control的显示与隐藏

  public static void HideButton(Control parent, String buttonId)
        {
            if ( parent != null && !String.IsNullOrEmpty(buttonId) )
            {
                Control btn = parent.FindControl(buttonId) as Control;
                if ( btn != null )
                {
                    btn.Visible = false;
                }
            }
        }

posted @ 2011-04-02 11:14  hsxiaoma  阅读(194)  评论(0)    收藏  举报