前文说到Context.Server.Transfer的缺点就是不能指定querystring,但是用
Context.RewritePath("AA.Aspx","","OKOK=3333");
Context.Server.Transfer("Test2.Aspx");
这样,就能执行Test2.Aspx,并且QueryString是OKOK=3333。
这个用途特别大。我目前用这个方法来避免使用 Response.Redirect 。
Tags: hust
Posts Tagged “hust”前文说到Context.Server.Transfer的缺点就是不能指定querystring,但是用 Context.RewritePath("AA.Aspx","","OKOK=3333"); 这样,就能执行Test2.Aspx,并且QueryString是OKOK=3333。 这个用途特别大。我目前用这个方法来避免使用 Response.Redirect 。 Tags: hust |