for (int i = 0; i < gvIncomeYG.Rows.Count; i++) { Label lblYG_DYYGSR_BHS = ((Label)gvIncomeYG.Rows[i].Cells[18].FindControl("YG_DYYGSR_BHS")); }
YG_DYYGSR_BHS是前台的控件的ID
gvIncomeYG是gridview的ID
gridview里找到控件,布布扣,bubuko.com
gridview里找到控件
原文:http://www.cnblogs.com/ZXdeveloper/p/3808300.html