私はWebMethod属性 を呼び出すための単純なJSONの方法を使用していますが、それはASPXファイルすなわちURLで動作します:pagemethodはasmxファイルではなく、aspx any suggesionから機能しませんか?
'myclass.aspx/myfunction'
が、それは私がASMXファイルに同じ機能を置けば仕事とASMXにURLを変更doesntの。
asmxサービスを有効にするために必要なことはありますか?
VBのコードとASMX://あなたからShared
キーワードを削除する必要がありますファイル
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class mintnow_default
Inherits System.Web.Services.WebService
<System.Web.Services.WebMethod()> _
<System.Web.Script.Services.ScriptMethod()> _
Public Function abc(ByVal args As String) As String
Return returnValue
End Function
End Class
うーん何exavtly staticキーワード??私はあなたを取得しません – Ironsun
自動生成されたasmxは、コメントを解除すると言う_この行を行ったが、そのntの作業 –
Ironsun
ページメソッドは、例えば、 'public static int SomeMethod(int param ) '。 '静的'を取り除く。 –