all groups > asp.net building controls > october 2003 >
You're in the

asp.net building controls

group:

Cross-application user controls?



Cross-application user controls? mdelvecchio NO[at]SPAM visi.com
10/20/2003 2:10:47 PM
asp.net building controls: Hi,

I work in an environment where many developers work on serveral
different web apps, each launched as a Virtual Directory webapp in
IIS. The parent folder for all of these webapps is "/InetPub/wwwroot".

I had hoped that it would be possible to create a "/controls" folder
in wwwroot, and allow any child VD/webapp's webform to load user
controls from it, ala:

<%@ Register TagPrefix="AP" TagName="DrilLDownUI"
src="/controls/content/drillDownUI.ascx" %>

....alas, this does not appear possible. I get:

"The virtual path '/controls/content/drillDownUI.ascx' maps to another
application, which is not allowed."

I have searched for articles on google on this, but it appears this
functionality is not supported. Can anyone confirm?

I'm guessing that the work around is to create custom server controls
and distribute .dlls to the child VD/webapp's "/bin" dirs. I was
hoping not to have to do that because, being new to server controls,
they seem much more difficult for me to generate compared to webforms
or user controls.


Thanks!
Re: Cross-application user controls? Colin Young
10/21/2003 9:24:46 AM
That behaviour is by design. There may be work arounds other than the one
you suggest, but custom controls are really not that difficult to write, and
they are much easier to use and deploy. Pick up a copy of "Developing
Microsoft ASP.Net Server Controls and Components" from MS Press if you are
interested in learning to create custom controls.

Colin

[quoted text, click to view]

Re: Cross-application user controls? Teemu Keiski
10/21/2003 10:40:05 PM
Have you checked this article?

http://authors.aspalliance.com/jimross/Articles/ShareUserControls.aspx

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

[quoted text, click to view]

AddThis Social Bookmark Button