【发布时间】:2014-03-31 08:19:18
【问题描述】:
我正在开发我的第一个 jQuery 和 ASP.Net 网络服务,但它无法运行,希望有人能告诉我我的方式的错误吗?
我设置了一个 jsFiddle:http://jsfiddle.net/3hufY/1/,在 1.10.1 上有基本的 HTML 和 jQuery
下面的 asmx 文件代码(抱歉在 VB 中)
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
'<System.Web.Script.Services.ScriptService()> _
'<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
'<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
'<ToolboxItem(False)> _
Public Class myService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
<WebMethod()> _
Public Function FullName(ByRef First As String, ByRef Last As String) As String
Return "Your name is " & First & " " & Last
End Function
End Class
在小提琴中显示完整的 URL,在本地我只显示本地 URL,以防万一它有所作为。
【问题讨论】:
-
您能告诉我们您的具体问题是什么吗?
-
我没有得到响应,而是返回错误
标签: javascript jquery asp.net vb.net web-services