#副標=網頁資料存取 #大標=ASP.NET 2.0資料存取新面貌(1) #眉標=ASP.NET #作者=王寧疆 ----------------------------box 程式1------------------------------ -------------------------------end----------------------- --------------------------box 程式2----------------------- void GridView1_RowCreated(object sender, GridViewRowEventArgs e) {   //判斷是所顯示的資料列中是否有ImageButton控制項   if (e.Row.FindControl("ImageButton1") != null)   {    //設定ImageButton控制項的OnClientClick屬性的內容值     ImageButton ib= (ImageButton)e.Row.FindControl("ImageButton1");     ib.OnClientClick = "return confirm('確定要刪除?')";   } } ------------------------------end---------------------------