How to share code between website and its subfolders?

Discussion in 'ASP General' started by SM, Dec 4, 2008.

  1. SM

    SM Guest

    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.
     
    SM, Dec 4, 2008
    #1
    1. Advertising

  2. SM

    Bob Barrows Guest

    SM wrote:
    > 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.

    --
    HTH,
    Bob Barrows
     
    Bob Barrows, Dec 4, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Axel Dahmen

    Share Information Between a Page and its UserControls?

    Axel Dahmen, Oct 24, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    128
    Axel Dahmen
    Oct 24, 2003
  2. Saraswati lakki
    Replies:
    0
    Views:
    1,350
    Saraswati lakki
    Jan 6, 2012
  3. thunk
    Replies:
    1
    Views:
    318
    thunk
    Mar 30, 2010
  4. thunk
    Replies:
    0
    Views:
    494
    thunk
    Apr 1, 2010
  5. thunk
    Replies:
    14
    Views:
    629
    thunk
    Apr 3, 2010
Loading...

Share This Page