Using controls across multiple virtual directories

  • Thread starter Thread starter Paul Hodgson
  • Start date Start date
P

Paul Hodgson

Is there any easy way to have .ascx controls used by pages in different
virtual directories?

My situation is that I have some pages that need to be accessed using SSL -
so I've put these pages in a separate virtual directory that is set up in
IIS to require secure access. Trouble is however that these pages need to
use some of the same .ascx controls that my non-secure pages need (and which
are therefore located in the root directory, where my non-secure pages are).
And every time I try to register the controls in the secure .aspx files,
VS.NET complains that I'm not
allowed to use controls in different applications or virtual directories.

Any help appreciated :-)

Paul
 
Paul Hodgson said:
Is there any easy way to have .ascx controls used by pages in different
virtual directories?

My situation is that I have some pages that need to be accessed using SSL -
so I've put these pages in a separate virtual directory that is set up in
IIS to require secure access. Trouble is however that these pages need to
use some of the same .ascx controls that my non-secure pages need (and which
are therefore located in the root directory, where my non-secure pages are).
And every time I try to register the controls in the secure .aspx files,
VS.NET complains that I'm not
allowed to use controls in different applications or virtual directories.

ASP.NET allows to share source by pointing to the correct .cs code but they
will be and should be compiled for their own assemblies.

It would be the best thing to create your controls as separate
control-library, compile that, and distribute that assembly among your
asp.net apps.
 
Back
Top