如何阅读ASP.NET原始URL的查询字符串PARAMS? [英] How to read the query string params of a ASP.NET raw URL?
本文介绍了如何阅读ASP.NET原始URL的查询字符串PARAMS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个变量
string rawURL = HttpContext.Current.Request.RawUrl;
我如何读取查询字符串参数,这个网址是什么?
How do I read the query string parameters for this url?
推荐答案
这也可能是你在
Uri theRealURL = new Uri(HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.RawUrl);
string yourValue= HttpUtility.ParseQueryString(theRealURL.Query).Get("yourParm");
这篇关于如何阅读ASP.NET原始URL的查询字符串PARAMS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文