Cross-application user controls?

M

matt del vecchio

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!
matt
 
C

Colin Young

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top