First, you need to have some class to store your category collection in tree.
For example:
public class CategoryBO
{
public int CategoryID{get;set;}
public List<CategoryBO> SubCategories{get;set;}
}
or
public class CategoryBO
{
public int CategoryID{get;set;}
public int? ParentCategoryID{get;set;}
}
Then you should implement some method to bind checkboxlist or treeview (with checkboxes) into some control in which you will save required information about category (f.e. with
ParentCategoryID
to identify parent).