A collection of miscellaneous utilities for N2 framework and ASP.Net platform in general. To name a few:

- Strongly typed wrappers over DetailCollection, which allow modifying collection through generic .Net interfaces IDictionary and IList. (Note: a patch is included to enable DetailCollection used as IDictionary)

- [EditableUserControlAttribute] allowing usage of a User Control (.ascx) as item property editor

- UserTree Web Control, used for selection of standard ASP.Net membership Users and Roles (include a dedicated demo control for feature exploration)

- minor handy tweaks and fixes for ASP.Net server controls, such as validation-enabled CheckBoxList wrapper


1. Include .csproj project into your solution
2. Update references to N2 and libraries


1. Encapsulate access to a DetailCollection using wrappers:

public IList MyProperties {
get { return this.GetDetailCollection("MyDetails", true).AsList(); }

Now you'll be able to add new property to collection by calling MyProperties.Add(new MyProperty(..)) without resorting to assign a whole collection (notice: there's no setter required).

2. To edit property with a user control, decorate either said property or a whole item with appropriate attribute, for instance the second case:

[WithEditableUserControl("My Property", "~/MySite/UI/MyControl.ascx", "", "CurrentItem", 100, "")]
public class MyEntity: N2.ContentItem

3. To explore features of UserTree control, drop a demo on your web form:


11/17/2008 3:08:05 PM






Download Homepage Source Code Edit Addon