Samples

Check some sample code to learn more about User Control functions

The sample code for User Control functions may get you started if you prefer to learn by example.

To use it on your website, copy the files to ~/App_Data/UserControls/Examples.

Breadcrumbs

Default web.config contains a reference to CompositeC1SiteMapProvider

<configuration>
  <system.web>
    <siteMap defaultProvider="CompositeC1">
      <providers>
        <add name="CompositeC1" type="Composite.AspNet.CompositeC1SiteMapProvider, Composite" />
      </providers>
    </siteMap>
  </system.web>
</configuration>

It allows you to use built-in and custom ASP.NET webpage’s navigation controls:

.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Breadcrumb.ascx.cs" Inherits="Breadcrumb" %>

<asp:SiteMapPath runat="server" />

Download the sample

.ascx.cs

using System;
using Composite.Functions;

public partial class Breadcrumb : Composite.AspNet.UserControlFunction
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}

Download the sample