和以前的用法有点不同,所以记录下来了。

ArrayList list = new ArrayList();
foreach (GridViewRow row in GridView1.Rows)
{
 CheckBox box = (CheckBox)row.Cells[3].Controls[1];
 if (box.Checked)
  list.Add(row.Cells[0].Text);
}
return list;


Dim list As ArrayList = New ArrayList()
For Each row As GridViewRow In GridView1.Rows
    Dim box As CheckBox = CType(row.Cells(3).Controls(1), CheckBox)
    If (box.Checked) Then
        list.Add(row.Cells(0).Text)
    End If
Next
Return list

相关文章:

  • 2021-12-18
  • 2022-02-19
  • 2021-08-07
  • 2022-12-23
  • 2021-08-14
  • 2021-11-19
  • 2022-03-08
  • 2022-01-15
猜你喜欢
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-11-11
  • 2021-07-05
相关资源
相似解决方案