1. 打开新的窗口并传送参数: g#NZ ,~
bG&"9b_c
传送参数: }14{2=!Q
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") %I!:ITa
<
`qRA]
接收参数: UX`]k{Mz
string a = Request.QueryString("id"); ?6Cz[5\
string b = Request.QueryString("id1"); rdJm{<
|5I'CNi\
2.为按钮添加对话框 d#:3be{|&q
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); W$dn_9W
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") v]2S`ffP
HQ9f ,<
3.删除表格选定记录 F Kc;W
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; E}CiQUx
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() bLz*A-
kH*P n'
4.删除表格记录警告 *IlaM'[*
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) yTE%hHH]&[
{ &