void ItemsGrid_Command(Object sender, DataGridCommandEventArgs e)
{ switch(((LinkButton)e.CommandSource).CommandName)
{ case "Delete":
DeleteItem(e);
break; // Add other cases here, if there are multiple ButtonColumns in
// the DataGrid control. default:
// Do nothing.
break; }ms-help://MS.NETFrameworkSDKv1.1.CHS/cpref/html/frlrfsystemwebuiwebcontrolsdatagridclassitemcommandtopic.htm
{ switch(((LinkButton)e.CommandSource).CommandName)
{ case "Delete":
DeleteItem(e);
break; // Add other cases here, if there are multiple ButtonColumns in
// the DataGrid control. default:
// Do nothing.
break; }ms-help://MS.NETFrameworkSDKv1.1.CHS/cpref/html/frlrfsystemwebuiwebcontrolsdatagridclassitemcommandtopic.htm
这里item.Cells[3].Text就是你要选的那一行的标记内容
{
string sRedirect="<a href='WebForm2.aspx?flag=" + item.Cells[1].Text.ToString()+ "'>" + item.Cells[4].Text + "</a>";
item.Cells[4].Text=sRedirect;
//上面是我的方法,你也可以用你的方法建立超级链接列
}
//在WebForm2用
string flag=Page.Request.QueryString["flag"].ToString();