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. Advertising

  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. Advertising

  3. Miguel

    Miguel Guest

    Thank you!!.
     
    Miguel, Apr 21, 2008
    #3
    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. andrea crotti

    Sharing code between different projects?

    andrea crotti, Aug 13, 2012, in forum: Python
    Replies:
    1
    Views:
    124
    Steven D'Aprano
    Aug 14, 2012
  2. Chris Angelico
    Replies:
    0
    Views:
    166
    Chris Angelico
    Aug 13, 2012
  3. andrea crotti
    Replies:
    2
    Views:
    143
    Miki Tebeka
    Aug 15, 2012
  4. Jean-Michel Pichavant

    Re: Sharing code between different projects?

    Jean-Michel Pichavant, Aug 14, 2012, in forum: Python
    Replies:
    0
    Views:
    150
    Jean-Michel Pichavant
    Aug 14, 2012
  5. Cameron Simpson

    Re: Sharing code between different projects?

    Cameron Simpson, Aug 14, 2012, in forum: Python
    Replies:
    0
    Views:
    191
    Cameron Simpson
    Aug 14, 2012
Loading...

Share This Page