一个页面,有查询,审核,删除,取消审核 按钮,每次结尾 处都要 调用 Initdata方法,重新刷新数据

繁琐哇,我的解决方法是

 

 protected void Page_Load(object sender, EventArgs e)
        {
            AddInitdata(Button1, Button2);
        }

 

 void AddInitdata(params Control[] C)
        {
            foreach (Control item in C)
            {
                (item as Button).Click += test;
            }
        }

   protected void test(object sender, EventArgs e)         {

      InitData();

        }

相关文章:

  • 2021-10-18
  • 2021-12-25
  • 2022-12-23
  • 2021-12-09
  • 2021-11-17
  • 2021-09-15
  • 2022-12-23
猜你喜欢
  • 2022-01-22
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案