tags:

views:

78

answers:

2

hi guys, I have a web service in c# and its working well in c#.Following is one method i used in it

[WebMethod(EnableSession = true)]
        public void abc(BllNew objNew)
        {
            new DAL.Entity.BllNew().sample();
        }

But again i implemented above method in vb and is like this

[WebMethod(EnableSession = true)]
        public void abc(BllNew objNew)
        {
            new DAL.Entity.BllNew().sample();
        }

One syntax error is showing near 'new' keyword.What change i hve to get rid of syntax error.Pls help.

A: 

Try this:

<WebMethod(EnableSession := True)> _
Public Sub abc(objNew As BllNew)
    New DAL.Entity.BllNew().sample()
End Sub
Robert Harvey
+1  A: 

Well, I don't have all of your libraries, but I think that this is right:

<WebMethod(EnableSession:=True)> _
Public Sub abc(ByVal objNew As BllNew)
    dim d as New DAL.Entity.BllNew().sample()
End Sub
RBarryYoung
Doggone it! Why the heck won't my updates show until after I post?!? :-( ###
RBarryYoung