/// <summary>&nbs
p; /// 将设置好的值赋给父页面
/// </summary>
/// <par
am name="count">需要传递的值</param>
void SetValueToParentPage(int count, string str
PErsons)
{
StringBuilder jsStr = new StringBuilder();
jsStr.Append("
VAR retValue = new Object();");
if (count
== 0)
{
jsStr.Appen
DFormat("retValue = null;");
}
else
{
jsStr.AppendFormat("retValue.Nums='{0}';", count);
jsStr.AppendFormat("retValue.
names='{0}';", strPersons);
}
jsStr.Append("window.returnValue = retValue;window.close();");
ClientScript.RegisterStartupScript(GetType(), "close", jsStr.ToString(), true);
}
function OpenPerChoose(url) {
var openobj = window;
if (typeof (window.dia
LOGarguments) == "object") {
openobj = window.dialog
arguments;
}
var returnValue = showPopWin(url, 800, 600, openobj);
if (returnValue != null) {
document.getElementById("<%=txtQualifiedNums.ClientID %>").value = returnValue.Nums;
}
}
//弹出窗口
function showPopWin(url, width, h
eight, returnFunc) {
width = parseInt(width) + 30;
height = parseInt(height) + 30;
return window.showModalDialog(url + "&Datetime=" + GetTime(), document, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:0;
status:0;scroll:auto;
center:1;resizable:1;");
}
<asp:TextBox ID="txtQualifiedNums" runat="server" Width="50px" ReadOnly="true"></asp:TextBox>