Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 从查询字符串获取参数Sharepoint 2010_Asp.net_Sharepoint 2010_C# 3.0 - Fatal编程技术网

Asp.net 从查询字符串获取参数Sharepoint 2010

Asp.net 从查询字符串获取参数Sharepoint 2010,asp.net,sharepoint-2010,c#-3.0,Asp.net,Sharepoint 2010,C# 3.0,我有以下问题 http://mydomain/mysite/SitePages/DisplayTemplateList.aspx?CustomerID=7&IsDlg=1" 我用下面的公式得到customerid的值 HttpUtility.ParseQueryString(Request.Url.ToString()).Get("CustomerID") 我又回来了 有什么想法吗 仅适用于Uri的查询部分。 使用Request.Url的查询部分,而不是完整的Url,你应该可以开始

我有以下问题

http://mydomain/mysite/SitePages/DisplayTemplateList.aspx?CustomerID=7&IsDlg=1" 
我用下面的公式得到customerid的值

HttpUtility.ParseQueryString(Request.Url.ToString()).Get("CustomerID")
我又回来了

有什么想法吗

仅适用于
Uri的
查询部分。
使用Request.Url的
查询部分,而不是完整的Url,你应该可以开始了

HttpUtility.ParseQueryString(Request.Url.Query).Get(“CustomerID”)

仅适用于
Uri的
查询部分。
使用Request.Url的
查询部分,而不是完整的Url,你应该可以开始了

HttpUtility.ParseQueryString(Request.Url.Query.Get(“CustomerID”)

Request.QueryString.Get("CustomerID")