我爱Aspx >> Asp.Net >> 使用 HttpContext.RewritePath使用 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
Ҷƪл˵?
使用 HttpContext.RewritePath[05-20]
在类中获取当前页面Page对象的引..[05-20]
在类中获取当前页面Page对象的引..[05-20]
C#实现控件数组[05-20]
web.config文件详解[05-20]
ASP.NET:Email Web Page[05-20]
DataBinder.Eval用法范例[05-20]
ASP.NET 页面对象模型[05-20]
Asp.net 中服务端控件事件是如何..[05-20]
table的宽度,单元格内换行问题[05-20]