I am using simple json method for calling webmethod but it works with aspx file ie url:
'myclass.aspx/myfunction'
but it doesnt work if I put same function in an asmx file and change url to asmx.
Is there anything else have to be done to enable asmx service ?
asmx with vb code: // this works
<%@ WebService Language="VB" Class="WebService" %>
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)> _
Public Class WebService
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
asmx with codebehind file
<%@ WebService Language="VB" CodeBehind="default.vb" Class="default" %> //this doesnt work
code behind file
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