Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to share user controls across apps

Reply
Thread Tools

how to share user controls across apps

 
 
dx
Guest
Posts: n/a
 
      01-07-2005
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


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      01-08-2005
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/de...ebControls.asp

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


"dx" <(E-Mail Removed)> wrote in message
newsnEDd.50401$(E-Mail Removed)...
>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
>



 
Reply With Quote
 
 
 
 
Felipe Garcia
Guest
Posts: n/a
 
      01-08-2005
You can accomplish this in a "pretty ugly way".
Try publishing your user controls in GAC.
"Steve C. Orr [MVP, MCSD]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/de...ebControls.asp
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
>
> "dx" <(E-Mail Removed)> wrote in message
> newsnEDd.50401$(E-Mail Removed)...
>>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
>>

>
>



 
Reply With Quote
 
dx
Guest
Posts: n/a
 
      01-08-2005

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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/de...ebControls.asp
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
>
> "dx" <(E-Mail Removed)> wrote in message
> newsnEDd.50401$(E-Mail Removed)...
>>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
>>

>
>



 
Reply With Quote
 
dx
Guest
Posts: n/a
 
      01-08-2005

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:(E-Mail Removed)...
> You can accomplish this in a "pretty ugly way".
> Try publishing your user controls in GAC.
> "Steve C. Orr [MVP, MCSD]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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/de...ebControls.asp
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://Steve.Orr.net
>>
>>
>> "dx" <(E-Mail Removed)> wrote in message
>> newsnEDd.50401$(E-Mail Removed)...
>>>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
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Accessing controls across user controls Vince ASP .Net 3 03-27-2008 11:46 AM
How to share a collection of model files across many apps? Elliott Blatt Ruby 3 03-23-2007 08:44 PM
Best Practice: How to share an ASP.NET webform across multiple web apps: Jheitmuller ASP .Net 1 08-02-2004 10:56 PM
Share user control across applications mg ASP .Net 1 12-18-2003 11:44 PM



Advertisments