Hi Dag,
From your description, you used to use some ASP.NET UserControls in your
web applicatoin and currently want to rebuild them as ASP.NET Custom Server
control so as to embed them into assemblies. And you're wondering on how to
deal with the ascx file of the UserControl when moving to Custom
ServerControl, yes?
As for this problem, I think if you want to rebuild these control as Custom
SErver Control , the ascx file for UserControl is no longer used. Because
ServerControl is rather different from the UserControl which will need us
to manually construct it's Control hierarchy and Render out the "Html"
output via code. The UserControl's ascx file is actually a source template
which will be parsed at runtime to help generate the UserControl's actual
class , just like the Asp.net page's dynamic compiled. They're different
from each other. Here are some reference on both of them in MSDN:
#Composite Control vs. User Control
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcompositecontrolvs
usercontrol.asp?frame=true
#Recommendations for Web User Controls vs. Web Custom Controls
http://msdn.microsoft.com/library/en-us/vbcon/html/vbconwebusercontrolsvscus
tomwebcontrols.asp?frame=true
#Developing ASP.NET Server Controls
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondevelopingwebforms
controls.asp?frame=true
Hope helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx