To more easily support custom code in Chameleon-based themes, two new controls were added: CustomCondition and CustomAction.
From the updated Introduction to Chameleon: Condition Controls post...
CustomCondition (<CSControl:CustomCondition />)
CustomCondition adds support for code-based conditions by exposing a single property, CustomResult, which can be set to the result of custom code. For example:
<CSControl:CustomCondition runat="server" CustomResult='<%# DateTime.Now.Hour == 12 %>' />
will evaluate to true only if the server time is within the noon hour.
From the update Introduction to Chameleon: Action Controls post...
CustomAction (<CSControl:CustomAction />)
CustomAction adds support for code-based actions by exposing an event, CustomEvent, which can be used to implement inline code. The CustomEvent is passed a reference to the parent control executing the event as well as the parent control's parameter (which is control-specific).
For example,
<script runat="server" language="C#">
protected void MyCustomEventHandler(System.Web.UI.Control sender, object parameter)
{
// custom code here
}
</script>
<CSControl:CustomAction runat="server" CustomEvent="MyCustomEventHandler" />
would execute the custom code within the MyCustomEventHandler method defined on the page.
These controls should make it easier to define custom logic and actions in Chameleon-based themes.
Note that these new controls are not included in Community Server 2007 beta-1. They will be available in Community Server 2007 beta-2.