V
Victor
Hi. all
I have a customize web control. I have three simple properties and
customized render class. then I add this control into my datalist like
<aspataList ID="datalist" runat="server" RepeatColumns="3">
<ItemTemplate>
<uc:mycontrol id="test" runat="server" />
</ItemTemplate>
</aspataList>
In the code-behind I have something like
List<mycontrol > lst = new List<mycontrol >;
lst.add(new mycontrol ());
lst.add(new mycontrol ());
lst.add(new mycontrol ());
datalist.datasource= lst;
datalist.databound();
But i found the control can not be rendered properly. Instead of displaying
four images, no images has been shown. What did I do wrong here? Can someone
give me some reference on how to add your customized control to datalist
then bind the value and render it properly.
Cheers
Thanks a lot
Victor
I have a customize web control. I have three simple properties and
customized render class. then I add this control into my datalist like
<aspataList ID="datalist" runat="server" RepeatColumns="3">
<ItemTemplate>
<uc:mycontrol id="test" runat="server" />
</ItemTemplate>
</aspataList>
In the code-behind I have something like
List<mycontrol > lst = new List<mycontrol >;
lst.add(new mycontrol ());
lst.add(new mycontrol ());
lst.add(new mycontrol ());
datalist.datasource= lst;
datalist.databound();
But i found the control can not be rendered properly. Instead of displaying
four images, no images has been shown. What did I do wrong here? Can someone
give me some reference on how to add your customized control to datalist
then bind the value and render it properly.
Cheers
Thanks a lot
Victor