?
Solved

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

Posted on 2007-08-07
3
Medium Priority
?
207 Views
Last Modified: 2013-12-17
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?


Thanks,
newbieweb
0
Comment
Question by:newbieweb
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
geodan7 earned 2000 total points
ID: 19651032
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;



0
 

Author Comment

by:newbieweb
ID: 19651065
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?
0
 

Author Comment

by:newbieweb
ID: 19651222
Got it.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question