I have some common UserControls i want to share between to sites (on the
same mashine but on diffrent virtual paths).
right now i have on solution file with aprox 10 projects. 2 of these is
webprojetcs wich need to shere some common userControls. Optimally i want a
class libarary project wich contains the controls so i could import the DLL
and use the controls. But that of course doesnt work.
How should i do this? Sinve i only can create UserControls in a webProejct,
and dont want to create a "dummy" webProject from wich I can share
controles. Neither do i want one project to be a "master" project, because
there are...equal.
Any comments?. I imagine the also could be some security issues if i had to
share between so production projects.
Thank in regardsAnders K. Jacobsen [DK] wrote:
> Hi
> I have some common UserControls i want to share between to sites (on the
> same mashine but on diffrent virtual paths).
> right now i have on solution file with aprox 10 projects. 2 of these is
> webprojetcs wich need to shere some common userControls. Optimally i want a
> class libarary project wich contains the controls so i could import the DLL
> and use the controls. But that of course doesnt work.
> How should i do this? Sinve i only can create UserControls in a webProejct,
> and dont want to create a "dummy" webProject from wich I can share
> controles. Neither do i want one project to be a "master" project, because
> there are...equal.
> Any comments?. I imagine the also could be some security issues if i had to
> share between so production projects.
> Thank in regards
>
Don't waste your time doing that.
Basically copy paste the same user controls in both paths.
Files are not several MB's. And the solution that you are thinking will
cause performance problems. You don't need to do it when you don't have to.
--
SevDer
http://www.sevder.com
> Don't waste your time doing that.
> Basically copy paste the same user controls in both paths.
> Files are not several MB's. And the solution that you are thinking will
> cause performance problems. You don't need to do it when you don't have
> to.
You might be right in your assumption. Guess I strictly dont need this
generallity.
Anders
Please check this
http://authors.aspalliance.com/stev...s/netreuse1.asp
--
Saludos,
Eugenio Serrano
NDSoft Consultoria y Desarrollo
MS MVP ASP.Net
Voluntario Ineta Latam (www.ineta.org/latam)
"Anders K. Jacobsen [DK]" <none@.at.all> escribi en el mensaje
news:ul94acx2EHA.3452@.TK2MSFTNGP14.phx.gbl...
> Hi
> I have some common UserControls i want to share between to sites (on the
> same mashine but on diffrent virtual paths).
> right now i have on solution file with aprox 10 projects. 2 of these is
> webprojetcs wich need to shere some common userControls. Optimally i want
a
> class libarary project wich contains the controls so i could import the
DLL
> and use the controls. But that of course doesnt work.
> How should i do this? Sinve i only can create UserControls in a
webProejct,
> and dont want to create a "dummy" webProject from wich I can share
> controles. Neither do i want one project to be a "master" project, because
> there are...equal.
> Any comments?. I imagine the also could be some security issues if i had
to
> share between so production projects.
> Thank in regards
Hi,
The recommended method of share a control between multiple web sites is to
create a custom web control and deploy it to the GAC. Then you can
reference it from multiple projects/sites.
While this is not recommended it may get you past your issue.
Site 1:
Store your usercontrols (ascx) in a directory separate from the other
source.
e.g:
Site 1
|-bin
|-images
|-userControls
|- *.aspx
Then add a virtual directory under the root of Site 2 Pointing to the
userControls directory of Site 1
e.g
Site 2
|-bin
|-images
|-UserControls (Virtual Directory)
|- *.aspx
This would in allow you to reference your user controls across sites...but
again I do not recommend it.
Bryce
"Anders K. Jacobsen [DK]" <none@.at.all> wrote in message
news:ul94acx2EHA.3452@.TK2MSFTNGP14.phx.gbl...
> Hi
> I have some common UserControls i want to share between to sites (on the
> same mashine but on diffrent virtual paths).
> right now i have on solution file with aprox 10 projects. 2 of these is
> webprojetcs wich need to shere some common userControls. Optimally i want
a
> class libarary project wich contains the controls so i could import the
DLL
> and use the controls. But that of course doesnt work.
> How should i do this? Sinve i only can create UserControls in a
webProejct,
> and dont want to create a "dummy" webProject from wich I can share
> controles. Neither do i want one project to be a "master" project, because
> there are...equal.
> Any comments?. I imagine the also could be some security issues if i had
to
> share between so production projects.
> Thank in regards
0 comments:
Post a Comment