1. 打开新的窗口并传送参数: }`_2fJ6
[ B (lJz
传送参数: 6B+
@76w H
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") -%t0'cKn,
n[iil$VKh
接收参数: 5 ;|9bWH
string a = Request.QueryString("id"); 1qQgAhoY
string b = Request.QueryString("id1"); hD$U8~zK
)(ma
2.为按钮添加对话框 Gf%o|kX]
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); `8y &
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") k~vmHb
F~DG:x~
3.删除表格选定记录 Ffhbs D
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; uj:w^t ][
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() Y]Fq)-
Vy/g;ZPU1
4.删除表格记录警告 +s S*EvF
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) K^w9@&