CrmEntityDataSource is a custom data source web control that provides an entity as a data item that a databound web control can bind to. CrmEntityDataSource can be bound to the current site map node and expose the CRM properties of the current page request's entity.

Adding the CrmEntityDataSource to a Page Template

The following control declaration can be added to an ASP.NET page template in the Visual Studio Web Application project. The following example utilizes the CrmSiteMap snippet expression to assign the current entity as the DataItem.  It is recommended to place this control in your master page file. The starter portals have this control placed immediately after the <html> tag, but the location in the file is not important.

<crm:CrmEntityDataSource ID="CurrentEntity" DataItem="<%$ CrmSiteMap: Current %>" runat="server" />


The CrmEntityDataSource control has the following properties that can be specified to modify the behavior.

DataItem The entity data item to which the control will bind.