[ASP.Net 2.0] Loading ascx-file located outside webscope

J

Jesper Stocholm

I would like to be able to load a Control (ASCX) that is placed in a folder
outside webscope - but with read/write ability for IUSR/ASPNET-process. I
usually use Page.LoadControl() to load my controls [0], but this method
requires a _virtual_ path - and it does not permit paths that go "above"
the root folder of the virtual directory/website.

Is there a way arround this?

I need it since I am building a small CMS that will allow the admin-users
to either upload their own controls via FileUpload or have the CMS create
the control-file/code itself. If I cannot work around this, I will need to
create write-permissions on a folder within webscope, and for security-
reasons I do not like to do this.

Any help will be greatly appreciated..

:eek:)

[0] Using Page.LoadControls("~/controldir/mycontrol.ascx");
 
G

Guest

Jesper,

Loading controls on the fly good job. Here's a couple links that you can
use to help with this. Sorry neither of them do exactly what you want. The
second link does come extremely close.

The title on this link is missleading. You'll see when you get there. Look
for the portal stuff. http://msdn2.microsoft.com/en-us/library/ms233955.aspx

Way down at the bottom of this page with the import catalog webpart users
can add webparts to a webpart portal (webpart is just a user control in a
webpart wrapper code)
http://www.c-sharpcorner.com/Upload...ht08042005042119AM/Building_WebParts.mht.aspx

Good Luck
DWS
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top