1. 打开新的窗口并传送参数: V@z/%=PJ
|w~*p
N0
传送参数: xG4 C 6s
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") LkF*$
,Cm1~ExJ
接收参数: rx#GrV*y
string a = Request.QueryString("id"); u&`rK7J
string b = Request.QueryString("id1"); iqX%pR~Yo
=yJc pj
2.为按钮添加对话框 AKLFUk
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); Y2uy@j*N
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") 9O&MsTmg$
&F0>V o
3.删除表格选定记录 -idbR[1{?
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; {v d+cE
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() rV%;d[LB
gi_f8RP=2a
4.删除表格记录警告 r;waT@&C
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) Y)S
f;
{ 5@bmm]
switch(e.Item.ItemType) @&E7Pg5
{ F&+_z&n