DataList template as standalone Razor component

In all the DataList examples, the template is defined within the DataList. Is it possible to have the template as an standalone Razor component? If so, how do I integrate the template Razor component and the DataList?


Yes, this is possible. Create a component as usual and set its properties from the template context:

<Template Context="order">
   <MyCustomComponent Text=@order.OrderName Date=@order.OrderDate />
1 Like

Thank you very much!!!!