服务器的客户端动态增加

1)btn_del.Attributes.Add("onclick", "javascript:return del();")

2)页面注册js:

Page.ClientScript.RegisterClientScriptInclude("My97DatePicker_WdatePicker_67789",
                                                    "My97DatePicker/WdatePicker.js");

3)A页面打开B页面,B页面提交数据并自动关闭:

 A页面代码:

string openNew = "javascript:window.open('pagePop.aspx','查找','height=250,width=550,top='+(screen.availHeight-250)/2+',left='+(screen.availWidth-550)/2+',toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes');return false;";
Button1.Attributes.Add(
"onclick", openNew);
B页面提交并关闭:

Type cstype = this.GetType();
            ClientScript.RegisterStartupScript(cstype, 
"""window.opener.document.getElementById('TextBox1').value='" + TextBox1.Text + "';window.close();");

你可能感兴趣的:(服务器的客户端动态增加)