遍历GridView

遍历GridView
foreach  (GridViewRow row  in  GridView1.Rows)
            
{
                CheckBox cb 
= (CheckBox)row.FindControl("CheckBox1");
                
if (cb.Checked == true)
                
{
                    Response.Write(row.Cells[
1].Text+"--------------");
                }

            }

你可能感兴趣的:(遍历GridView)