在itemdatabind()中做
if (e.Item.ItemIndex>-1)
{
DataTable dt=)(DataTable)dgList.DataSource
int pid=(int)dt.Rows[e.Item.ItemIndex][0];
string name=dt.Rows[e.Item.ItemIndex][1];
e.Item.Cells[5].Attributes.Add("onclick","window.location.href='AfficheManager_Edit.aspx?name="+name+"&id="+ pid+"'");
if (e.Item.ItemIndex>-1)
{
DataTable dt=)(DataTable)dgList.DataSource
int pid=(int)dt.Rows[e.Item.ItemIndex][0];
string name=dt.Rows[e.Item.ItemIndex][1];
e.Item.Cells[5].Attributes.Add("onclick","window.location.href='AfficheManager_Edit.aspx?name="+name+"&id="+ pid+"'");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货