2012-07-11 9 views
0

我正在嘗試使用第三方REST API的服務,它們將參數推送到我的URL上。例如:從ASP.NET C中推送的URL獲取參數#

http://domainname/location.aspx?information=MM/DD/YY HH:MM:SS AM/PM 

其中domainname是我的網站,而location.aspx是我的頁面,它將讀取正在推送的參數。 如何獲取ASP.NET Web Forms C#中的「信息」參數?謝謝。

回答

1
string information = Request["information"]; 
+1

或Server.UrlDecode(Request.QueryString [「information」])如果你想更具體。 – 2012-07-11 10:02:48

+0

謝謝@Matthew Abbott – 2012-07-11 11:00:29

1
string information = Request.QueryString["information"] 

還有的jQuery/JavaScript的做這件事的方式。 refer to this post

+0

謝謝@ patel.milanb – 2012-07-11 11:00:45