发送URL:
if (File.Exists(p_strUrl))
{ //Server.UrlEncode(path)
this.Page.RegisterStartupScript("", "<script>window.open('XXX.aspx?pdfPath=" + Server.UrlEncode(p_strUrl) + "')</script>");
return;
}
else
{
this.Page.RegisterStartupScript("", "<script>alert('未找到PDF文件!')</script>");
return;
}
跳转的界面(XXX.aspx?)就收URL: