1. 打开新的窗口并传送参数: 6m9\0)R
e{Mkwi+j
传送参数: u\K`TWb%
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") lo7>$`Q
?+]
接收参数: L$]Y$yv
string a = Request.QueryString("id"); w~AO;X*Ke"
string b = Request.QueryString("id1"); {FNCC*=
%zjyZ{=
2.为按钮添加对话框 t4zKI~cO
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); PTF|"^k+
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") [L2N[vy;
f 0/q{*
3.删除表格选定记录 _k)EqPYu@
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; }o=s"0 a
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() 3|Y.+W
H9=8nLb.
4.删除表格记录警告 TaG(sRI
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) $3Sm?
{ C9%A?'`
switch(e.Item.ItemType) nI`9|W
{ 5N#Sic M
case ListItemType.Item : (]"`>,ray
case ListItemType.AlternatingItem : >)F)@KAuN4
case ListItemType.EditItem: [WR*u\FF
TableCell myTableCell; V4<f4|IL
myTableCell = e.Item.Cells[14]; "6WE6zq
LinkButton myDeleteButton ; &