Non embedded tiles
tiles outside the assembly

The previous examples all have the tiles embedded in the assembly. This is the default configuration of SharpTiles. However this might not be desired. SharpTiles allows for changing the way resources are found. Resources are found through resource locators this can be configured. SharpTiles comes with three build in factories:

  • AssemblyBasedResourceLocator - Assembly based
  • FileLocator - File based
  • VirtualDirLocator - File based prepared for web use

In the custom tile repository example we will show how to build your own resource locator.
This tutorial change the previous tutorial to use the VirtualDirLocator. To accomplish this we need to make changes in the web.config. We need to add a tilesConfiguration.

  <section name="tilesConfiguration"        type="org.SharpTiles.Connectors.TilesConfigurationSection,

<tilesConfiguration ConfigFilePath="my.tiles.xml"


  1. Defines the config section. This is standard for adding a config section in .NET
  2. With the ResourceFactory SharpTiles is configured to use the web virtual directory locator. This is basicly the file locator using the webvirtual dir as a starting point. The 'Prefix' adds an additional prefix before the requested resource. In this case the views folder is also prepended. So Home/Index.tile becomes <virtual dir>/View/Home/Index.tile. The 'RefreshIntervalSeconds' specifies how often SharpTiles checks if any of the resources are changed.

Make sure that all tiles, .tile, and tiles.xml are marked as Content instead of Embedded Resource. We also need to change the tiles.xml file. File paths uses '/' instead of an '.' see the *

<?xml version="1.0" encoding="utf-16"?>
<tiles xmlns:xsi="" xmlns:xsd="">

  <tile name="Home.Index" extends="Default.Page.Layout">
  <attribute name="title" type="String" value="Home Page"/>
  <attribute name="body" value="Views/*Home.Index.tile"/>


Contact form fixed

I regret reporting that the contact form was broken for the last week. All mails send to us were corrupted(empty). So reported bugs in the last week are not received. I'm aware that the timing with regards to the monorail release isn't very handy. The contact form is fixed now. I apologize.

4 February, 2010

Monorail released M5

Monorail is released. The release also contains some minor fixes.

23 January, 2010

Monorail almost finished

Maikel Willemse is coding a Monorail view engine. It's available in the nightly release. A tutorial and a new release will be available shortly.

2 January, 2010

No more tiles.xml
(if you like)

A NSTL view engine is now available. You can do SharpTiles without having a tiles.xml. You will lose the power of dependency injection. If you are interested check out the tutorial page.

21 July, 2009

Developer M3 released

Fixed a couple of parse bugs. Cleaned up refreshing of resources, resource locations and registration of the TilesViewEngine. Wrote some tutorials
Ronald Dehuysser contributed the <tiles:insertTemplate/> and <tiles:putAttribute/> tag.

8 June, 2009

HtmlHelper wrapped II

Updated tag reference documentation.

5 April, 2009

Ready for MVC RC 2

SharpTiles is now ready to use with MVC RC 2.

6 March, 2009

HtmlHelper wrapped

The MVC HtmlHelper is now wrapped and can be used. For it's only available in the nightly build. When the documentation and new Tutorials are made a new release will be made.

22 December, 2008

Ready for Beta 1

SharpTiles is now ready to use with MVC Beta 1. The tutorial page will be updated soon.

3 November, 2008

We've got Tiles

It took me a bit longer than expected but Milestone 1 is reached. Tiles are now available.

23 July, 2008

First release

Finally, after some hard work my pet project is ready for its initial release. Here it is! Please give it some thoughts and feel free to add comments.

23 May, 2008

SID: PopUp 0