从ASP.NET C中的推送URL中抓取参数#

时间:2012-07-11 09:53:24

标签: c# asp.net rest webforms

我正在尝试使用第三方REST API的服务,他们将参数推送到我的URL。类似的东西:

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

其中domainname是我的网站,而location.aspx是我的页面,它将读取被推送的参数。 如何获取ASP.NET Web Forms C#中的“信息”参数?谢谢。

2 个答案:

答案 0 :(得分:1)

string information = Request["information"];

答案 1 :(得分:1)

string information = Request.QueryString["information"]

还有jquery / javascript这样做的方式。 refer to this post