2019-11-08
Stop Server.TransferRequest from using the query string of the current request
stackoverflow
Question

The documentation for Server.TransferRequest contains the following remark:

If the path parameter specifies a query string, it will be used as the new query string. If no query string is included, the query string of the request will be re-used.

How can I transfer a request with a query string to a path without a query string?

Answer
1

I ended up using HttpContext.RewritePath instead. Use an empty queryString ("") to prevent it from using the query string of the current request.

Stop Server.TransferRequest from using the query string of the current request
See more ...