【发布时间】:2014-11-02 13:56:07
【问题描述】:
我想在数据库中保存信息并将保存的行的 id 传递到新页面,然后下一页必须在新窗口中显示此 id。我写了这段代码,但只是保存操作正常工作,显示新页面不起作用。代码如下:
protected void btnReportWaybill_Click(object sender, EventArgs e)
{
Session["Code"] = null;
string strId = txtCode.Text.Trim();
SaveOperation();
Session["Code"] = strId;
ClientScript.RegisterClientScriptBlock(this.GetType(), "Message", "window.open('../ExportReport/DirectAWB.aspx','_blank');", true);
}
【问题讨论】:
-
请检查是否被视为弹窗,某些浏览器可能会阻止弹窗
-
不要踩弹窗,浏览器允许弹窗