Question Specifying the name used for the JavaScript class

njsokalski

Well-known member
Joined
Mar 16, 2011
Messages
102
Programming Experience
5-10
I am creating a WebService using the following:

<%@ WebService Language="vb" CodeBehind="~/MyWebService.asmx.vb" Class="myprojectname.MyWebService" %>

This works fine, except that it names the generated JavaScript class "myprojectname.MyWebService" (which is longer than I would like), but I want it to be named "MyWebService" (or something shorter than the fully qualified class). If I change the Class attribute to Class="MyWebService" I receive an error that the webservice cannot be created (obviously because it needs to know the fully qualified class). Is there any other way to let it know the fully qualified class name (maybe some other extra directive?) or some way to specify what name I want it to use for the JavaScript class? Thanks.
 

Latest posts

Back
Top