RE: User control to custom control
by Steven Cheng[MSFT] on 11/1/2007 6:14:00 AM
Hi JJ,
Have you got any progress or do you have any further questions? If so,
please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: stcheng@online.microsoft.com (Steven Cheng[MSFT])
>Organization: Microsoft
>Date: Tue, 30 Oct 2007 04:17:48 GMT
>Subject: RE: User control to custom control
>
>Thanks for Peter's input.
>
>Hi JJ,
>
>So far for template based control (ascx usercontrol and ASPX page), there
>hasn't any good means to directly convert them into custom control.
>However, I think the following means is worth a try:
>
>Since ASP.NET will dynamically compile ASPX or ascx into dynamic class at
>runtime, you can manually use precompilation to precompile the website and
>get the precompiled assemblies(you can choose non-updatable so that ascx ,
>aspx will also be precompiled into assembly). After that you can use
>reflector utility to inspect the precompiled code which should contains
the
>code that programmatically construct the ascx/aspx UI. Of course, you need
>to modify them since those dynamically generated code is not quite human
>readable, but can be used as a reference. How do you think?
>
>Sincerely,
>
>Steven Cheng
>
>Microsoft MSDN Online Support Lead
>
>
>This posting is provided "AS IS" with no warranties, and confers no rights.
>