【发布时间】:2018-01-05 07:36:59
【问题描述】:
我在 Response.Redirect 的帮助下将以下用于重定向到另一个页面的 javascript 代码转换为 c# 代码(服务器端)
javascript 是这样的。
function GetBillDetails() {
var childWindow = null;
var SelVal = ddl.options[ddl.selectedIndex].value;
var SelText = ddl.options[ddl.selectedIndex].text;
childWindow = window.open('../Mine/MyPrint.aspx?BillNo=' + SelVal + '&Bill=' + SelText +, "MainForm", "width=725px,height=530px,left=150px,top=50px,scrollbars=no,toolbars=no,resizable=no")
}
而带有 Response.Redirect 的 C# 代码是,
string BillNo = "255", Bill = "CG2/78";
Response.Redirect("../Mine/MyPrint.aspx?BillNo=" + BillNo + "&Bill='" + Bill + ");
它工作正常。但我的问题是如何在 Response.Redirect 中添加这些新窗口属性,如 javascript 代码中使用的那样
"width=725px,height=530px,left=150px,top=50px,scrollbars=no,toolbars=no,resizable=no"
【问题讨论】:
标签: javascript c#