More in this section
Blogs RSS feed

Creating Page-Based Modules in Sitefinity 4

by User Not Found

One of the most powerful features of Sitefinity 4 is the ability to use the CMS platform itself to modify its own Administration Backend. This means you can use Sitefinity to edit Sitefinity, creating pages on the backend as easily as you do on the front end.

This presents a great extensibility point, because it allows you to create modules on the fly by simply creating a page in the backend and dropping a custom administration user control onto the page!

Video Demo

I prepared a video demonstration walking through this process from start to finish with a basic "Hello, World" module. Take a look then read on for more details.


Watch Video on Telerik.TV


For a Page-Based Module, you'll need to implement at least two widgets: One for the Administration, and one for the Public view.

You can implement these any way you wish, or reuse existing controls you've already developed, connecting using any data source method you wish (object, dataset, sql, xml, etc). As long as the user control is self-contained, it should work as a widget.

The same goes for the public view. You an implement separate widgets for list/details view, as long as you handle communication between them at the control level, such as using query strings to share data back and forth.


In order to be able to drag these controls onto the page, you need to register them in the toolbox. For help with this topic, see the following documentation: Adding Controls to the Toolbox.

Note that you do need to add the admin widget to the toolbox as well in order to be able to drop it on the page. However you can immediately remove it from the toolbox after installing it on the page. In addition, you could also utilize Configuration Policies to only allow specific users to see the admin widgets.


Since a Page-Based Module has two components (admin/public) you'll of course need to add two pages, one in the front end for the public view, and one in the backend for the admin view.

The Backend Page Editor (Under Administration > System > Backend Page Editor) allows you to quickly add a new backend page to the Sitefinity Administration at any location, such as under the Content menu or even at the top level, as I did in the video demo.

Upgrading and Uninstalling

Because these modules are Page-Based, modifying the administration or public view is as simple as editing the underlying user controls. Make your changes, recompile and your module will be immediately updated.

Uninstalling your Page-Based Modules is also a breeze, since they are simply pages in the Sitemap. Simply use the Page Editor to delete the pages, and remove the items from the Toolbox.

Be sure to delete the controls from any public pages that use them if you are also going to delete the public user controls. You can also leave the public user controls in place so that they can continue to be used even after deleting the administration page.

What's Next

Page-Based Modules are a great way to easily extend Sitefinity with custom functionality. This is especially true if you've already implemented a solution and want to reuse it in Sitefinity.

Next time, we'll take this a step further, and wrap this process into an actual Sitefinity Module, complete with Install and Uninstall methods so that your modules are completely self-contained. The result is a module very similar to the "Intra-Site" Modules from 3.x, only much simpler!

Until then, try out Page-Based Modules on your own Sitefinity sites and share your experiences with us in the Sitefinity Discussion Forums.


Leave a comment
  1. Dan Swatik Jun 16, 2011
    Nice demo but where is the zip containing your sample
  2. Darren Jun 22, 2011
    Hey Josh. Can you supply the source code as in your video some the the coding you do not show and I am getting an error stating
    "The 'DataSource' property cannot be set declaratively" when I try to drag and drop my HWAdmin control widget onto my backend page.

  3. Peter Jun 24, 2011
    Hello guys. See here ;-)
  4. Josh Jun 27, 2011
    Oops sorry guys, yes the example is in the next post on intra-site modules linked by peter, which is just an extension of this idea.

    A more complete example will be built in the upcoming webinar on june 30 ( and will also be present in the next release of the SDK.  
  5. DJ Dec 21, 2011
    With code listed above i got it to work as far as 'update' at which poit i got an error;

    ObjectDataSource 'HelloWorldSource' could not find a non-generic method 'Update' that has parameters: Message, ID.

    Spent ages trying to fix to no avail, any thoughts anyone?
  6. DJ Dec 21, 2011
    With code listed above i got it to work as far as 'update' at which poit i got an error;

    ObjectDataSource 'HelloWorldSource' could not find a non-generic method 'Update' that has parameters: Message, ID.

    Spent ages trying to fix to no avail, any thoughts anyone?
  7. Josh Dec 21, 2011
    do you have an Update method defined in your data source? this is usually automatically generated for you if you're using a dataset...

    sometimes when I get this error it helps me to delete the datasource control, then readd it using the wizard so it wires everything up again correctly...

    let me know if that doesn't work and perhaps we can discuss it further one-on-one
  8. DJ Dec 22, 2011
    Hi Josh, thanks for replying so fast.

    readding the data control added the update method that was indeed missing. This didn't fully fix the problem but the info here;

    allowed me to get it all working

  9. Med Mar 27, 2012
    Hi and thanks for the tuto, it's very useful,
    Can you tell us please how can we do to get picture (binary type ) from a database using axd !
    Thank you so mutch 

    Leave a comment