ASP.Net Server Control (Web Custom Control) Code Update Problem

Discussion in 'ASP .Net Web Controls' started by Pete Mahoney, Sep 1, 2004.

  1. Pete Mahoney

    Pete Mahoney Guest

    I have created a new Server Control or Web Custom Control, and
    everything with the control itself works great. The problem is if I
    want to change any of the code in my Server Control none of the
    projects that pull in this control see the changes. Just for kicks
    say I want to add the following line to my Server Control

    Page.Response.Write("Hi there")

    Well if I add this line of code, and say 5 .Net projects are pulling
    in this server control none of these projects will display the message
    "Hi there" until I go into each project remove the reference to the
    old .Dll for the server control, and readd the .Dll for the updated
    server control.

    So each project is creating its own local copy of this .Dll and then
    referencing that. I would like them all to reference ONE global copy,
    and when I change that copy it updates all my projects.

    Is there a way to do this? If so any links that show how to do it
    would be great.
     
    Pete Mahoney, Sep 1, 2004
    #1
    1. Advertising

  2. Pete Mahoney

    Levi Rosol Guest

    how are your projects setup? do you have one solution with all 5
    projects, and the web control project in it?

    If so, it sounds like you need to change the build order and
    dependencies so that the control gets built first, and then the
    web projects, and also so that each web project relies on the
    control project.

    To do this, assuming you have all projects in one solution, right click
    on any one project or the solution, and select "Project Build Order"
    Make sure that your server control project is the first one. Click OK.

    Then, for each web project that needs the latest and greats of your
    uber server control, right click on the project and select "Project
    Dependencies". Put a check mark next to your server control project
    and click OK.

    Keep in mind that VS creates a solution for ever project you start. There
    is no reason at all why you could not add your server control project to
    each and every web solution you have instead of keeping them all in one
    solution as I described above. Even though this would seem like duplication
    of code, it's not because you are point to the same server control codebase,
    just from 5 different locations.

    Hope this helps.

    --
    Thanks
    Levi Rosol

    Find Cheap .Net Server Controls At:
    http://www.IvelDesigns.com


    "Pete Mahoney" <> wrote in message
    news:...
    >I have created a new Server Control or Web Custom Control, and
    > everything with the control itself works great. The problem is if I
    > want to change any of the code in my Server Control none of the
    > projects that pull in this control see the changes. Just for kicks
    > say I want to add the following line to my Server Control
    >
    > Page.Response.Write("Hi there")
    >
    > Well if I add this line of code, and say 5 .Net projects are pulling
    > in this server control none of these projects will display the message
    > "Hi there" until I go into each project remove the reference to the
    > old .Dll for the server control, and readd the .Dll for the updated
    > server control.
    >
    > So each project is creating its own local copy of this .Dll and then
    > referencing that. I would like them all to reference ONE global copy,
    > and when I change that copy it updates all my projects.
    >
    > Is there a way to do this? If so any links that show how to do it
    > would be great.
     
    Levi Rosol, Sep 1, 2004
    #2
    1. Advertising

  3. Thanks a ton. That fixed it right up.



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Peter Landerud, Sep 1, 2004
    #3
  4. Pete Mahoney

    Guest

    You can also add your control to the GAC!

    Pete Mahoney wrote:

    > I have created a new Server Control or Web Custom Control, and
    > everything with the control itself works great. The problem is if I
    > want to change any of the code in my Server Control none of the
    > projects that pull in this control see the changes. Just for kicks
    > say I want to add the following line to my Server Control
    >
    > Page.Response.Write("Hi there")
    >
    > Well if I add this line of code, and say 5 .Net projects are pulling
    > in this server control none of these projects will display the message
    > "Hi there" until I go into each project remove the reference to the
    > old .Dll for the server control, and readd the .Dll for the updated
    > server control.
    >
    > So each project is creating its own local copy of this .Dll and then
    > referencing that. I would like them all to reference ONE global copy,
    > and when I change that copy it updates all my projects.
    >
    > Is there a way to do this? If so any links that show how to do it
    > would be great.
    >
     
    , Sep 2, 2004
    #4
    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. Jitendra Singh via .NET 247
    Replies:
    1
    Views:
    781
    Brock Allen
    Mar 30, 2005
  2. Donald Simpson

    Web Custom Control & Custom Collection problem

    Donald Simpson, Jul 11, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    136
    Donald Simpson
    Jul 11, 2003
  3. Tim
    Replies:
    0
    Views:
    211
  4. Srikar
    Replies:
    1
    Views:
    144
    Brock Allen
    Apr 19, 2005
  5. SpencerW
    Replies:
    5
    Views:
    255
    Steven Cheng[MSFT]
    May 27, 2005
Loading...

Share This Page