Sharing code between Projects.

Discussion in 'ASP .Net' started by Miguel, Apr 16, 2008.

  1. Miguel

    Miguel Guest

    Hi Everybody!!

    I'm trying to migrate a lot of asp 3.0 applications to asp.net.

    The problem is that currently my directories structure are like this:

    - myIncludes/DBConnections
    - myIncludes/MyStyles
    - myIncludes/MyLibrary

    - MyDir/MyApplication1
    - MyDir2/MyApplication2
    - ...



    Now, I have a lot of functions and connectionStrings in the
    folder "myIncludes/MyLibrary", and all of my applications share them
    with an #include clause. So if I change a Database user/Password I
    just have to change it in only one file which is located in
    ( myIncludes/DBConnections ).


    Do you know how can I structure my WebSite in order to keep this
    hierarchy/functionality in .NET?? By now I have to create a WebConfig
    for each application, with the ConnectionString, and I have to
    replicate all code that is shared by all my application.

    Thank you very much for your answer.

    Miguel.
     
    Miguel, Apr 16, 2008
    #1
    1. Advertisements

  2. Make a separate code library project and include it in every application. Or
    just reference the dll produced by that project.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "Miguel" <> wrote in message
    news:...
    > Hi Everybody!!
    >
    > I'm trying to migrate a lot of asp 3.0 applications to asp.net.
    >
    > The problem is that currently my directories structure are like this:
    >
    > - myIncludes/DBConnections
    > - myIncludes/MyStyles
    > - myIncludes/MyLibrary
    >
    > - MyDir/MyApplication1
    > - MyDir2/MyApplication2
    > - ...
    >
    >
    >
    > Now, I have a lot of functions and connectionStrings in the
    > folder "myIncludes/MyLibrary", and all of my applications share them
    > with an #include clause. So if I change a Database user/Password I
    > just have to change it in only one file which is located in
    > ( myIncludes/DBConnections ).
    >
    >
    > Do you know how can I structure my WebSite in order to keep this
    > hierarchy/functionality in .NET?? By now I have to create a WebConfig
    > for each application, with the ConnectionString, and I have to
    > replicate all code that is shared by all my application.
    >
    > Thank you very much for your answer.
    >
    > Miguel.
    >
    >
    >
    >
    >
    >
    >
     
    Eliyahu Goldin, Apr 16, 2008
    #2
    1. Advertisements

  3. Miguel

    Miguel Guest

    Thank you!!.
     
    Miguel, Apr 21, 2008
    #3
    1. Advertisements

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. Michael
    Replies:
    3
    Views:
    478
    Curt_C [MVP]
    Feb 3, 2005
  2. Manohar Kamath

    Sharing ASP.NET code between two sites

    Manohar Kamath, Apr 6, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    621
    =?Utf-8?B?RGF2ZSBGYW5jaGVy?=
    Apr 6, 2005
  3. Stephen

    sharing code between web apps

    Stephen, Aug 6, 2005, in forum: Java
    Replies:
    1
    Views:
    391
    Jon Martin Solaas
    Aug 9, 2005
  4. Greg Schmidt

    Sharing code between cases

    Greg Schmidt, Feb 9, 2005, in forum: C++
    Replies:
    11
    Views:
    636
    Ioannis Vranos
    Feb 10, 2005
  5. sumit chawla
    Replies:
    1
    Views:
    637
    Thomas Matthews
    Jul 13, 2004
  6. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    Sharing Objects Between ASP.NET "Sites"/Projects

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Jun 3, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    1,079
    Steven Cheng[MSFT]
    Jun 5, 2007
  7. andrea crotti

    Sharing code between different projects?

    andrea crotti, Aug 13, 2012, in forum: Python
    Replies:
    1
    Views:
    174
    Steven D'Aprano
    Aug 14, 2012
  8. andrea crotti
    Replies:
    2
    Views:
    199
    Miki Tebeka
    Aug 15, 2012
Loading...