What "using" statement to use for a web service in same project

I have a Windows Form program and a web service in the same project, and I have added a web reference so the Form can access the Web service. But what "using" statement do I use in the header of the file?

The namespace is WebService1 and the service is called Service1.

Also, what constructor do I use?

newbiewebSr. Software EngineerAsked:
Who is Participating?
Well, if you have added a reference to the webservice DLL, then you should just need to use the namespace WebService1 like so:

using WebService1;

also, for web services....try adding a reference to:

using System.Web.Services;

newbiewebSr. Software EngineerAuthor Commented:
WebService1 does not work.

Under the Web References tab I have "localhost", actually.  When I look at the properties of localhost, I see:

Folder Name: locahost
URL Behavior: Dynamic
Web Reference: http://localhost:1055/Service1.asmx

Any suggestions?
newbiewebSr. Software EngineerAuthor Commented:
Got it.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.