在 .NET 中的 Web 服务中获取查询字符串(GET 请求数组) [英] Getting to the query string (GET request array) inside a web service in .NET
本文介绍了在 .NET 中的 Web 服务中获取查询字符串(GET 请求数组)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一种方法来访问包含在 Web 服务内的标准 ASP.NET 请求对象中的 .net 查询字符串.换句话说,如果我为这个 url 设置了一个 SOAP web 服务:
I'm looking to find a way to access the .net query string contained in the standard ASP.NET request object inside a web service. In other words if I set a SOAP web service to this url:
http://localhost/service.asmx?id=2
我可以访问 ID Get 变量吗?
Can I access the ID Get variable?
推荐答案
我只是在 asmx 文件中寻找上下文的请求",我看到了.但我不确定它是否正确.
I just looked for "Request" of the context in asmx file and I saw that. But I'm not sure if it is right.
this.Context.Request.QueryString["id"];
这篇关于在 .NET 中的 Web 服务中获取查询字符串(GET 请求数组)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文