public int pdxzs(DataGrid dg1)
  {
   int checkcount=0;
   for(int i=0;i<dg1.Items.Count;i++)
   {
    if(((System.Web.UI.HtmlControls.HtmlInputCheckBox)dg1.Items[i].FindControl("xuanze")).Checked==true)
     checkcount++;
   }
   return checkcount;
  }

//调用

if(pdxzs(datagrid1)==0)
{
   Response.Write("<script>alert('未选中任何职位!')</script>");
    return;
}

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2021-12-09
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-13
  • 2021-12-09
  • 2022-12-23
  • 2021-11-20
  • 2021-11-12
  • 2021-10-04
相关资源
相似解决方案