private void Page_Load(object sender, System.EventArgs e)
{
If (!IsClientScriptBlockRegistered("clientScript"))
{
string strScript = "<script>";
strScript += "function OpenWin(){";
strScript += "var str=window.showModalDialog('WebForm2.aspx',document.Form1.TextBox1.value)";
strScript += "if(str!=undefined) document.Form1.TextBox1.value=str";
strScript += "}";
strScript += "</script>";
RegisterClientScriptBlock("clientScript", strScript);
}
Button1.Attributes.Add["onclick", "OpenWin()"];
}
{
If (!IsClientScriptBlockRegistered("clientScript"))
{
string strScript = "<script>";
strScript += "function OpenWin(){";
strScript += "var str=window.showModalDialog('WebForm2.aspx',document.Form1.TextBox1.value)";
strScript += "if(str!=undefined) document.Form1.TextBox1.value=str";
strScript += "}";
strScript += "</script>";
RegisterClientScriptBlock("clientScript", strScript);
}
Button1.Attributes.Add["onclick", "OpenWin()"];
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货