Link to home
Start Free TrialLog in
Avatar of greddin
greddinFlag for United States of America

asked on

Adding a Web Reference to Inline code

I'm not sure if I'm phrasing this right, but for reasons not in my control I need to convert a VB.NET code-behind project to straight inline aspx code. Where all the code is inline in the page like classic ASP. My problem is that my project has two web references added to it. In VS.Net I just added them by using the gui and typing in the url for each. How do you add those to an inline page code?  

Any links or sample code in the right direction would be great.

Thank you.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

<%@ Import Namespace="System.IO" %>

Bob
Avatar of greddin

ASKER

Can you be a little more specific Bob?

How do I add the web references to inline code?
Avatar of greddin

ASKER

I'm wondering if I can just cut and paste the constructor from the generated proxy class and add it to the top of my web form?

I am sorry for being too brief.  

This applies to ASP.NET 1.1 (2003):
Since the System.IO is part of the .NET framework, all you need to do is add that reference to the top of the page file.  If you were trying to add a reference to an external library, you would need to copy that DLL to the bin folder.  

I am not sure about where the file gets copied for ASP.NET 2.0, but the directive at the top of the file is still the same.

Bob
Avatar of greddin

ASKER

Yes, this is ASP 1.1, but I don't understand what the System.IO namespace has to do with a web reference.

In the webform can you give me a snippet of syntax so I can understand this better?

Thank you,
-Greg
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial