No.
What you can do is have a single item template with a placeholder
<ITemTemplate>
<asp:PlaceHolder id="content" runat="server" />
</ItemTemplate>
Then, in the ItemDataBound event, check which type your DataItem is, and
load the appropriate user control.
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
PlaceHolder content = (PlaceHolder)e.Item.FindControl("content");
if (e.Item.DataItem is B)
{
...
}else...
}
you can learn more from
http://openmymind.net/index.aspx?documentId=8#4.2
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Robert" <ro**********@atlas.cz> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Hi,
if I create a class A with some properies, then create classes B and C
derived from A, later create and ArrayList filled with some B and C items.
This list I would like to use as a datasource for a repeater control. Is
it
possible to add more than one <ItemTemplate>? I would like to have i.e two
templates, one for B and second for C object.
I'm using ASP.NET (2.0) very shortly, but I haven't discovered much about
Repeater/Datalist/Datagrid.
Thank you very much.
Robert