|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dynamic loadcontrol of ascx with dll not in bin pathascx components. I use a httphandler to render my webform, and fill it dynamically with ascx components (with loadcontrol). A "ascx components" is as "ascx page" and its "DLL codebehind". It works like a charm when DLLs of ascx are placed in the "/bin folder". I'd like to be able to place them, (ascx+DLL together) in a subfolder of "/plugins folder" for examples. But when i done that i've got a parse error : "Parser Error Message: Could not load type 'XXX.YYY'" Because asp.net is not able to find theses assemblies ... - i've already tried to do AppDomain.CurrentDomain.AppendPrivatePath("plugins/A;plugins/B;plugins/C"), but it doesn't do nothing. - i know it could be possible to do it by hacking the machine.config or web.config. But i'd like to it in my code ! Do you know a solution to tell asp.net(or the usercontrol) to be able to find the DLLs of my ascx, without putting then in the bin folder of my root ??? thanx a lot ASP.NET mandates implicit loading of assemblies from ~/bin or the GAC. You
can always call Assembly.LoadFrom, but I'm not sure if the LoadControl will work with that. It's worth a try. -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > I try to make a framework in asp.net which will be able to manage some > ascx components. > I use a httphandler to render my webform, and fill it dynamically with > ascx components (with loadcontrol). > A "ascx components" is as "ascx page" and its "DLL codebehind". > It works like a charm when DLLs of ascx are placed in the "/bin > folder". > I'd like to be able to place them, (ascx+DLL together) in a subfolder > of "/plugins folder" for examples. > But when i done that i've got a parse error : > "Parser Error Message: Could not load type 'XXX.YYY'" > Because asp.net is not able to find theses assemblies ... > > - i've already tried to do > AppDomain.CurrentDomain.AppendPrivatePath("plugins/A;plugins/B;plugins > /C"), > but it doesn't do nothing. > - i know it could be possible to do it by hacking the machine.config > or web.config. But i'd like to it in my code ! > Do you know a solution to tell asp.net(or the usercontrol) to be able > to find the DLLs of my ascx, without putting then in the bin folder of > my root ??? > > thanx a lot > i've tried Assembly.LoadFrom ... but loadcontrol doesn't use it
*** Sent via Developersdex http://www.developersdex.com ***
Customizing ASP.NEt Hyperlink Control
Need Click Event to Fire from TextBox How to validate one of two Required TextBox Defining server-side Click event for Label web contol ? Urgent! GridView and templated controls binding---------Plz help how to display records in datagrid TemplateControl?? Creating a Tab in web form Textboxes with images Windows Explorer style custom control for web |
|||||||||||||||||||||||