In the ASP.NET model, user controls are the down and dirty way to get
repetitive functionality without complete black boxing your code. It is a
compromise between flexibility and full encapsulation. Because of the
compromise, you are stuck in a tigher box than you are with compiled code.
I can think of a possible kludge and fix for this issue:
The kludge is to aim at the source file and reflect emit in your
application. Have not tried with a user control, but it "should" work with
some tweaking.
The fix is to move your code to a library as a server control. This will
take more time.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Matteo Migliore" wrote:
Hi.
This is a question about ASP.NET 2.0.
How can I instantiate a UserControl without
the method LoadControl?
I need to create a usercontrol from
a .ascx file that is out of the web application,
it's placed into a virtual directory.
Thanks!
Matteo Migliore.