1. 打开新的窗口并传送参数: p\DSFB
.JV y}^Q\
传送参数: f([d/
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") vF)eo"_s*
avW33owb@
接收参数: CI=M0
string a = Request.QueryString("id"); ^.c<b_(=h
string b = Request.QueryString("id1"); *gOUpbtXa
WWT1_&0
2.为按钮添加对话框 N1hj[G[H"
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); =k5O*ql"
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") lYS*{i1^ '
yw >Frb5p
3.删除表格选定记录 Ho1 V)T>
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; ANTWWs}
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() 7m8(8$-6
eVj7%9
4.删除表格记录警告 OO\$'%
y`
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) fJ&\Z9zY
{ CW
-[c
switch(e.Item.ItemType) F<DXPToX%
{ O]KQ]zN
case ListItemType.Item : EAlLxXDDh
case ListItemType.AlternatingItem : XrI$@e*
case ListItemType.EditItem: i5gNk)D
TableCell myTableCell; d6)+d9?<