1. 打開新的窗口並傳送參數:
傳送參數:
response.write("")
接收參數:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.為按鈕添加對話框
Button1.Attributes.Add("onclick","return confirm(’確認?’)");
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}")
3.刪除表格選定記錄
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex];
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString()
4.刪除表格記錄警告
5.點擊表格行鏈接另一頁