protected void GridViewHeadText1_RowCommand(object sender, GridViewCommandEventArgs e)
{
//先宣告Row來源
GridViewRow row = (GridViewRow)((Control)e.CommandSource).NamingContainer;
//接下來取DataKeys的值,0表示第一個,用逗號在GridView中的DataKeys屬性分開
int RID = Convert.ToInt32(GridViewHeadText1.DataKeys[row.RowIndex].Values[0]);
int TID = Convert.ToInt32(GridViewHeadText1.DataKeys[row.RowIndex].Values[1]);
}

arrow
arrow
    全站熱搜

    法蘭克不要怕 發表在 痞客邦 留言(0) 人氣()