Question Multiple classes within a webservice

ridder

New member
Joined
Jun 7, 2011
Messages
1
Programming Experience
3-5
In the MyWebService.vb File,

' 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://localhost/MyNameSpace/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

NameSpace MyNameSpace
public class MyClass1
Inherits WebService
{
Public Function Welcome() As String
Return "Welcome"
End Function
}

public class MyClass2
{
Public Function Thanks() As String
Return "Thanks"
End Function
}
End Namespace

And In the MyWebService.asmx file,
<%@ WebService Language="VB" CodeBehind="~/App_Code/MyWebService.vb" Class="MyNameSpace.MyClass1, MyNameSpace.MyClass2" %>

It is not working, can you please anyone guide me how to use multiple class with in a webservice.
 
Back
Top