【发布时间】:2014-05-13 21:15:01
【问题描述】:
我是 Web 服务和 .net 的新手。 我想在我的 Web 服务中从 aspx.cs 文件中调用一个方法。 我该怎么做?
protected void SearchRec(object sender, EventArgs e)
{
....
}
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public void example(string text_to_search)
{
.....//call SearchRec here
}
【问题讨论】:
-
他们是同一班吗?
-
你能澄清一下吗?您希望您的代码调用 Web 服务吗?为什么不直接调用函数呢?
-
这个方法有什么作用?
-
我希望web服务调用后面代码中的方法
-
在数据库中搜索特定数据
标签: c# asp.net web-services asmx