How to share code between website and its subfolders?

S

SM

This is regarding ASP.NET 2.0.
I need the same code to be executable at the root of a website and in
subfolders of the website. I know of two possibilities:
[1] put the code in a DLL and put the DLL in the 'Bin' subfolders of the
root and the subfolders.
[2] put the source code directly in the 'App_Code' folders of the root and
the subfolders.

Is there any way to have code just in one folder and invokable from any
other subfolder of a website, so that code is shared?

A related question: when I compile a DLL project in a website solution in
VStudio 2005, what is the equivalent of adding a reference to a DLL (project
or file) in VStudio in the hosting website? Putting it another way, if I
manually deploy a website at a production host, how do I specify the location
of a DLL in client code? I put a DLL in the 'Bin' folder, and placed other
client code in the 'App_Code' folder. How do I specify to the code in the
'App_Code' folder the location of the DLL?

Thanks in advance for answers.
 
B

Bob Barrows

SM said:
This is regarding ASP.NET 2.0.

There was no way for you to know it (except maybe by browsing through
some of the previous questions before posting yours - always a
recommended practice), but this is a classic (COM-based) asp newsgroup.
ASP.Net is a different technology from classic ASP. While you may be
lucky enough to find a dotnet-savvy person here who can answer your
question, you can eliminate the luck factor by posting your question to
a newsgroup where the dotnet-savvy people hang out. I suggest

microsoft.public.dotnet.framework.aspnet.

There are also forums at www.asp.net where you can find a lot of people
to help you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top