Official Site Blog for ASPNETWorld.com
 Saturday, December 03, 2005
Turning an ascx User Control into a Redistributable Custom Control in ASP.NET 2.0 and VS 2005

Writing custom controls in ASP.NET 1.x requires a lot of development expertise.  In ASP.NET 2.0, you can create custom controls from ascx user controls.  Neat!  David Ebbo tells how this is done.

The basic steps to make this happen are as follows:

  1. Write your User Control as you normally would, typically using the Visual Studio 2005 designer. The main restriction is that the user control needs to be self-contained. 
  2. Test it using a simple page before trying to deploy it.
  3. Deploy the app to precompile it.
  4. Grab the user control's assembly produced by the deployment step, and you're essentially done: you have your Custom Control.
  5. Finally, use your Custom Control in other apps the same way as you always use Custom Control's.

Read David Ebbo's full article.


#    Comments [0]  


Comments are closed.