1. 打开新的窗口并传送参数: y[f%0*\B
K\}qYdPF
传送参数: C^JtJv
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") U0|wC,7"
<_8eOL<X
接收参数: 1Xcj=I-4
string a = Request.QueryString("id"); Ai%Wt-
string b = Request.QueryString("id1"); !
.Pbbs%
H5vg s2R
2.为按钮添加对话框 *` -
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); q%s<y+
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") t`6~ud>
aEUEy:.
3.删除表格选定记录 heES
[
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; =J-&usX
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() `)=sQ2P
fuf'r>1n
4.删除表格记录警告 \Pfm>$Ib=
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) Ng&K5