1. 打开新的窗口并传送参数: B(vCi^
ks6iy}f7
传送参数: J$5G8<d>
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") ?Js4\X!uJ
gq 3|vzNZ
接收参数: vu.?@k@
string a = Request.QueryString("id"); V*fv>f:Yv
string b = Request.QueryString("id1"); .w@B )f*
L(cKyg[R
2.为按钮添加对话框 RSbq<f>BFo
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); |<,0*2
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") ti6X=@ P:
,Eh]Zv1AE
3.删除表格选定记录 9QB,%K_:4
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; "*j8G8
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() hY%} x5ntU
@mxaZ5Vv}
4.删除表格记录警告 *QWOWg4w
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) rC!"<