昨天那个写法 返回老是在页面中显示一个数值!
其实不用创建RowCommand事件
直接在Button的Click事件中
prootected void Button1_Click(object sender, EventArgs e)
{
Button NowBtn =(Button)sender;
TableCell cell = (TableCell)NowBtn.Parent;
GridViewRow iRow =(GridViewRow)cell.Parent;
//获取主键列的值
this.IdValue = Convert.ToInt32(iRow.Cells[主键列序号].Text);
}
posted on 2007-11-10 11:35
冷风旋 阅读(612)
评论(2) 编辑 收藏 网摘