1. 打开新的窗口并传送参数: H<ovIMd
[hH>BEtm
传送参数: %rlqq*
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") SQU@JKi;g
ARnq~E@1
接收参数: $\]Mvd
string a = Request.QueryString("id"); $39TP@?:Z)
string b = Request.QueryString("id1"); Dt7z<1-)l
Lh-Y5(c
o
2.为按钮添加对话框 h\Y~sm?!`
Button1.Attributes.Add("onclick","return confirm(’确认?’)"); ]lyQ*gM
button.attributes.add("onclick","if(confirm(’are you sure...?’)){return true;}else{return false;}") )
d'H&c3
6?.S-.Mr
3.删除表格选定记录 6nsb)7a
int intEmpID = (int)MyDataGrid.DataKeys[e.Item.ItemIndex]; 0i8\Lu6
string deleteCmd = "DELETE from Employee where emp_id = " + intEmpID.ToString() 4)}>dxv
l]t^MEoc8
4.删除表格记录警告 l'2vo=IQ
private void DataGrid_ItemCreated(Object sender,DataGridItemEventArgs e) M3!;u%~}s
{ ZvC?F=tH
switch(e.Item.ItemType) ZR)M<