GridView的RowCommand事件[]
Control cmdControl = e.CommandSource as Control;
// 表示触发事件的 IButtonControl,保持统一性并便于后续操作,我们这里直接转化为控件基类 Control
GridViewRow row = cmdControl.NamingContainer as GridViewRow;
// 获取值
string status = ((HtmlInputHidden)row.Cells[1].Controls[1]).Value; //row.Cells[0].Text
-----------------------------------------------------------------------------------------------------------------------------------
repeater ItemDataBound事件
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DataRowView drv = (DataRowView)e.Item.DataItem;
string idStr = drv["id"].ToString();
}