.NET user controls provide an endless number of possibilities for your Umbraco installation. With user controls you can harness the power of .NET code inside your templates and content pages. If you can create something in a custom .NET application inside a user control, it's also possible to render/function it in an Umbraco rendered page.
Remember to have a <form runat=“server”/> tag in your template that encapsulates the user control. If you don't, the user control will not work.
This section shows how to extend the user experience by adding dynamic form functionality, as well as how to create custom data types for user input in the backoffice.
For detailed information on how to tap into the Umbraco Event Model, go to Chapter 12.
Using the built-in wrapper makes deploying custom code a real breeze. The simplest and most straightforward way to work with Umbraco and custom code is to create a standalone Visual Studio project in—basically—6 steps.
If you don't see your newly created user control in the edit macro details view, simply touch the web.config file in your installation and the application will restart manually. Touching the web.config means that you make a change to the file by adding a space and saving the file to update its last updated timestamp. This should clear any potential caching and you should see the file(s) listed.
If you do not have direct access to the root of your Umbraco website, installing the Config Tree package, found at http://our.umbraco.org/projects/developer-tools/config-tree, allows you edit access to the web.config and other configuration files in your Umbraco installation.
To make the backoffice as flexible as possible, Umbraco introduced the UserControlWrapper, which allows you to develop various input fields and add them as data types in the Developer section. See Chapter 12 for further information and examples on this topic.
In addition to allowing you to do everything in XSLT, .NET user controls provide you with methods for working with unpublished content.