http://www.yaosansi.com/blog/article.asp?id=336
使用 HttpContext.RewritePath 来配合 Server.Transfer/Execute
不少人都懂得在Applicaton_Start等事件中使用HttpContext.RewritePath来改变HttpHandler。
如果在 Server.Transfer/Execute 的调用前,使用RewritePath,更可以起到指定QueryString的效果。
例如
Context.RewritePath("AA.Aspx","","OKOK=3333");
Context.Server.Transfer("Test2.Aspx");
这样,就能执行Test2.Aspx,并且QueryString是OKOK=3333。
这个用途特别大。我目前用这个方法来避免使用 Response.Redirect
http://workgroup.cn/CS/blogs/aspnet/archive/2006/07/07/_7F4F2875_-HttpContext.RewritePath.aspx
浙公网安备 33010602011771号