how to share user controls across apps

Discussion in 'ASP .Net' started by dx, Jan 7, 2005.

  1. dx

    dx Guest

    I have 3 vb.net web applications. I would like all 3 to have access to a
    library of user controls. server controls wouldn't cause a problem but these
    are user controls (ascx.) From each solution I reference the user control
    library project and create a virtual directory under each applicatoin that
    links to the folder that contains the ascx files but I get a runtime error
    like:

    Description: An error occurred during the parsing of a resource required to
    service this request. Please review the following specific parse error
    details and modify your source file appropriately.

    Parser Error Message: Could not load type 'Reg.AffFooter'.

    Any ideas? Much thanks in advance.

    Stan
     
    dx, Jan 7, 2005
    #1
    1. Advertising

  2. User controls are easy to create, but there is no supported way to share
    them across projects.

    Conversly, Custom controls are easier to use and to reuse across projects
    because they are compiled into separate DLLs.

    Here's more info:
    http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "dx" <> wrote in message
    news:pnEDd.50401$...
    >I have 3 vb.net web applications. I would like all 3 to have access to a
    >library of user controls. server controls wouldn't cause a problem but
    >these are user controls (ascx.) From each solution I reference the user
    >control library project and create a virtual directory under each
    >applicatoin that links to the folder that contains the ascx files but I get
    >a runtime error like:
    >
    > Description: An error occurred during the parsing of a resource required
    > to service this request. Please review the following specific parse error
    > details and modify your source file appropriately.
    >
    > Parser Error Message: Could not load type 'Reg.AffFooter'.
    >
    > Any ideas? Much thanks in advance.
    >
    > Stan
    >
     
    Steve C. Orr [MVP, MCSD], Jan 8, 2005
    #2
    1. Advertising

  3. You can accomplish this in a "pretty ugly way".
    Try publishing your user controls in GAC.
    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > User controls are easy to create, but there is no supported way to share
    > them across projects.
    >
    > Conversly, Custom controls are easier to use and to reuse across projects
    > because they are compiled into separate DLLs.
    >
    > Here's more info:
    > http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://Steve.Orr.net
    >
    >
    > "dx" <> wrote in message
    > news:pnEDd.50401$...
    >>I have 3 vb.net web applications. I would like all 3 to have access to a
    >>library of user controls. server controls wouldn't cause a problem but
    >>these are user controls (ascx.) From each solution I reference the user
    >>control library project and create a virtual directory under each
    >>applicatoin that links to the folder that contains the ascx files but I
    >>get a runtime error like:
    >>
    >> Description: An error occurred during the parsing of a resource required
    >> to service this request. Please review the following specific parse error
    >> details and modify your source file appropriately.
    >>
    >> Parser Error Message: Could not load type 'Reg.AffFooter'.
    >>
    >> Any ideas? Much thanks in advance.
    >>
    >> Stan
    >>

    >
    >
     
    Felipe Garcia, Jan 8, 2005
    #3
  4. dx

    dx Guest

    Steve,

    Thanks for the reply. I'm going to have (another) decent sized project if I
    have to rewrite our user controls as server controls.

    I found this article yesterday evening. Anyone have experience with this
    approach?

    http://www.codeproject.com/aspnet/ctrlreuse.asp

    Thank You and have a great weekend,
    stan






    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > User controls are easy to create, but there is no supported way to share
    > them across projects.
    >
    > Conversly, Custom controls are easier to use and to reuse across projects
    > because they are compiled into separate DLLs.
    >
    > Here's more info:
    > http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://Steve.Orr.net
    >
    >
    > "dx" <> wrote in message
    > news:pnEDd.50401$...
    >>I have 3 vb.net web applications. I would like all 3 to have access to a
    >>library of user controls. server controls wouldn't cause a problem but
    >>these are user controls (ascx.) From each solution I reference the user
    >>control library project and create a virtual directory under each
    >>applicatoin that links to the folder that contains the ascx files but I
    >>get a runtime error like:
    >>
    >> Description: An error occurred during the parsing of a resource required
    >> to service this request. Please review the following specific parse error
    >> details and modify your source file appropriately.
    >>
    >> Parser Error Message: Could not load type 'Reg.AffFooter'.
    >>
    >> Any ideas? Much thanks in advance.
    >>
    >> Stan
    >>

    >
    >
     
    dx, Jan 8, 2005
    #4
  5. dx

    dx Guest

    Thanks for your reply Felipe. I'm curious, do you consider this ugly due to
    performance degredation or some other reason?

    Thanks again!

    stan

    "Felipe Garcia" <#> wrote in message
    news:...
    > You can accomplish this in a "pretty ugly way".
    > Try publishing your user controls in GAC.
    > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > news:...
    >> User controls are easy to create, but there is no supported way to share
    >> them across projects.
    >>
    >> Conversly, Custom controls are easier to use and to reuse across projects
    >> because they are compiled into separate DLLs.
    >>
    >> Here's more info:
    >> http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp
    >>
    >> --
    >> I hope this helps,
    >> Steve C. Orr, MCSD, MVP
    >> http://Steve.Orr.net
    >>
    >>
    >> "dx" <> wrote in message
    >> news:pnEDd.50401$...
    >>>I have 3 vb.net web applications. I would like all 3 to have access to a
    >>>library of user controls. server controls wouldn't cause a problem but
    >>>these are user controls (ascx.) From each solution I reference the user
    >>>control library project and create a virtual directory under each
    >>>applicatoin that links to the folder that contains the ascx files but I
    >>>get a runtime error like:
    >>>
    >>> Description: An error occurred during the parsing of a resource required
    >>> to service this request. Please review the following specific parse
    >>> error details and modify your source file appropriately.
    >>>
    >>> Parser Error Message: Could not load type 'Reg.AffFooter'.
    >>>
    >>> Any ideas? Much thanks in advance.
    >>>
    >>> Stan
    >>>

    >>
    >>

    >
    >
     
    dx, Jan 8, 2005
    #5
    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. mg
    Replies:
    1
    Views:
    495
    Hermit Dave
    Dec 18, 2003
  2. Chad A. Beckner

    Share User Control Across Applications - How?

    Chad A. Beckner, Jun 7, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    637
    John Saunders
    Jun 7, 2004
  3. Jheitmuller
    Replies:
    1
    Views:
    483
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,408
    Saraswati lakki
    Jan 6, 2012
  5. Elliott Blatt
    Replies:
    3
    Views:
    254
    Brian Candler
    Mar 23, 2007
Loading...

Share This Page