开发者

RewritePath doesn't change HttpContext.Current.Request

I have an httpModule that allows me to have custom urls, but direct the url to a specified page with additional query string 开发者_如何学Goinfo.

Let's say I use context.RewritePath to rewrite "Custom/Path" to a "/Path.aspx?queryKey=value"

When I try to recieve the "queryKey" query parameter, it doesn't exist because the Request.Path is still "Custom/Path".

How do I get the Request.Path to be "/Path.aspx?queryKey=value" so that I can get query string info?


You could use "../Path.aspx?queryKey=value", if you need to go back one directory.

Also, you would probably want to add a false for the rebaseClientPath option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜