62,046
社区成员
发帖
与我相关
我的任务
分享
string reloadUrl = Request.Path.Substring(Request.Path.IndexOf("loadUrl=")>0? Request.Path.IndexOf("loadUrl=")+ "loadUrl=".Length:0)
string reloadUrl = Request.Path.Substring(Request.Path.IndexOf("loadUrl=")>0? Request.Path.IndexOf("loadUrl=")+ "loadUrl=".Length+1:0)
void Application_BeginRequest(object sender,EventArgs e)
{
if (Request.Path.IndexOf("Default.aspx")>0)
{
string reloadUrl = Request.Path.Substring(Request.Path.IndexOf("loadUrl=")>0? Request.Path.IndexOf("loadUrl=")+ "loadUrl=".Length:0);
if (reloadUrl != Request.Path)
{
//设框架的id为myFrame
System.Web.UI.Page p = (System.Web.UI.Page)Context.Handler;
p.RegisterStartupScript("reloadUrl","javascript:document.all('myFrame').url='"+reloadUrl+"'");
//Page.RegisterStartupScript("reloadUrl","javascript:document.all('myFrame').url='"+reloadUrl+"'"); //直接引用
Response.End();
}
}
else
{
string newUrl = Request.ApplicationPath + "/Default.aspx?loadUrl=" + Request.Path;
Response.Redirect(newUrl, true);
}
}
function SetURL(url)
{
document.all.IFRAME1.src=url;
}
function btnBorrow_onclick()
{
SetURL("../BorrowOtherRation/ChooseTx.aspx");
ShowLayer();
}
function btnself_onclick()
{
SetURL("../SelfRation/ChooseTx.aspx");
ShowLayer();
}