从 WebRequest 获取查询字符串
可以说我有这个:
WebRequest myWebRequest1 = (WebRequest)asynchronousResult.AsyncState;
我知道我可以像这样获取 url myWebRequest1.RequestUri
但我想知道是否有任何方法可以使用比手动解析更好的方法来获取查询字符串,我意思是类似 myWebRequest1.QueryString[etc etc ]
有什么想法吗?
提前致谢....
Lets say i have this:
WebRequest myWebRequest1 = (WebRequest)asynchronousResult.AsyncState;
i know that i can get the url like this myWebRequest1.RequestUri
but i was wondering if there is any way to get the query strings using a better way than manualy parsing it , i mean something like myWebRequest1.QueryString[etc etc ]
any ideas ?
thanks in advance....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将请求 URI 作为字符串提取并使用:
HttpUtility.ParseQueryString(String )
Try extracting the request URI as a string and using:
HttpUtility.ParseQueryString(String)