2007年4月27日 星期五

e.Item.ItemIndex 在2005風貌

在 ASP.NET 2003的 DataGrid中常用於 DataGrid1_DeleteCommand 或 DataGrid1_DeleteCommand 的 DataGrid1.DataKeys[e.Item.ItemIndex] 來取得 DataGrid 某一行資料列的 "主索引鍵" 值, 在.NET 2005中做了修改, 變成: GridView1.DataKeys[e.RowIndex].Value

沒有留言: