I have a several projects full of .ascx UserControls that contain C# code blocks rather than having codebehind pages. I'm looking to consume a WCF service I've created, and I've added the Service Reference to the project, but I'm having trouble referencing it on the page using various directives.
Is this possible? The UserControls are used inside of WebParts in SharePoint 2010 if that makes a difference. Web service is deployed to _vti_bin if that matters as well, and is definitely operational (I've tested the exposed methods via a console app and through deployable projects which utilize codebehinds).
If this were not being done for SharePoint (yes, it makes a huge difference!) then I'd say that you should create a class library project, add the service references to the class library, and then use the class library from your user controls.
However, since it's SharePoint, you have to be concerned about deployment of DLL files.
I think some variant on my suggestion would work. You would have to sign the class library and place into the GAC, or you should arrange to bin-deploy it. In either case, I believe you'll want to include your controls and this class library in the same Feature.