Share webusercontrols between asp.net projects

Discussion in 'ASP .Net' started by jesusR, Mar 1, 2006.

  1. jesusR

    jesusR Guest

    In VS2003 (framework 1.1 or less) i was shareing my webusercontrols
    with this procedure:
    I created a web project (webusercontrol_project) with the web user
    control, i compiled and everything ok.
    Then on other project (other_project), i include a reference to the
    webusercontrol_project dll.
    in other_proyect i created a virtual directory to
    webusercontrol_project and i can use the web controls created on
    webusercontrol_project in the project other_project, adding manually
    them on some webform in other_proyect with this line:

    <%@ Register TagPrefix="uc1" TagName="nav_br"
    Src="sgl_share/nav_br.ascx"%>

    <uc1:nav_br id="Nav_br1" runat="server"></uc1:nav_br>



    A was triying to make the same on 2005 and i reaceive a lot of error

    1.- When i convert webusercontrol_project from 2003 to 2005 no dll is
    generated
    2.- with no dll on webusercontrol_project i can not make the reference
    on other_project
    3.- Vs2005 giveme an error on the register:
    <%@ Register TagPrefix="uc1" TagName="nav_br"
    Src="sgl_share/nav_br.ascx"%>
    The error said something like can't find the file
    "sgl_share/sgl_br/nav_br.ascx"
    And checking the virtual directory i can notice that everything is OK.

    The really question is:

    How can i share webusercontrols between diferents asp.net projects
     
    jesusR, Mar 1, 2006
    #1
    1. Advertising

  2. jesusR

    Teemu Keiski Guest

    Hi,

    here's a good blog post about the subject:
    http://weblogs.asp.net/scottgu/archive/2005/08/28/423888.aspx

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke

    "jesusR" <> wrote in message
    news:...
    > In VS2003 (framework 1.1 or less) i was shareing my webusercontrols
    > with this procedure:
    > I created a web project (webusercontrol_project) with the web user
    > control, i compiled and everything ok.
    > Then on other project (other_project), i include a reference to the
    > webusercontrol_project dll.
    > in other_proyect i created a virtual directory to
    > webusercontrol_project and i can use the web controls created on
    > webusercontrol_project in the project other_project, adding manually
    > them on some webform in other_proyect with this line:
    >
    > <%@ Register TagPrefix="uc1" TagName="nav_br"
    > Src="sgl_share/nav_br.ascx"%>
    >
    > <uc1:nav_br id="Nav_br1" runat="server"></uc1:nav_br>
    >
    >
    >
    > A was triying to make the same on 2005 and i reaceive a lot of error
    >
    > 1.- When i convert webusercontrol_project from 2003 to 2005 no dll is
    > generated
    > 2.- with no dll on webusercontrol_project i can not make the reference
    > on other_project
    > 3.- Vs2005 giveme an error on the register:
    > <%@ Register TagPrefix="uc1" TagName="nav_br"
    > Src="sgl_share/nav_br.ascx"%>
    > The error said something like can't find the file
    > "sgl_share/sgl_br/nav_br.ascx"
    > And checking the virtual directory i can notice that everything is OK.
    >
    > The really question is:
    >
    > How can i share webusercontrols between diferents asp.net projects
    >
     
    Teemu Keiski, Mar 1, 2006
    #2
    1. Advertising

  3. jesusR

    jesusR Guest

    Thanks a lot, it would help me a lot...
     
    jesusR, Mar 1, 2006
    #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. Tariq Ahmad
    Replies:
    0
    Views:
    508
    Tariq Ahmad
    Jul 11, 2003
  2. Craig Buchanan
    Replies:
    2
    Views:
    368
    Janaka
    Feb 12, 2004
  3. Nick Wouters
    Replies:
    1
    Views:
    550
    Kevin Spencer
    May 27, 2005
  4. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    Share User Controls Between Multiple projects

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Aug 7, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    778
    Marre
    Aug 10, 2005
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,428
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page