A
Andy Fish
Hi,
Say I had a repeater-like situation but were I wanted to have every 3rd item
look different instead of every alternating one. I could write my own custom
control and in the ASPX file something like this:
<myControl>
<mainItemTemplate>...</>
<secondItemTemplate>...</>
<thirdItemTemplate>...</>
</myControl>
The question is, in the data binding logic, how can I instantate the
template control and turn it into a real control? do I have to use
MemberwiseClone()
This is not an actual example - it's just there to illustrate the question.
In real life I want to be able to select between a number of templates based
on attribute values within the databound object
TIA
Andy
Say I had a repeater-like situation but were I wanted to have every 3rd item
look different instead of every alternating one. I could write my own custom
control and in the ASPX file something like this:
<myControl>
<mainItemTemplate>...</>
<secondItemTemplate>...</>
<thirdItemTemplate>...</>
</myControl>
The question is, in the data binding logic, how can I instantate the
template control and turn it into a real control? do I have to use
MemberwiseClone()
This is not an actual example - it's just there to illustrate the question.
In real life I want to be able to select between a number of templates based
on attribute values within the databound object
TIA
Andy