I am trying to pass a datalist value to a user control like this:
<aspataList RepeatColumns="2" runat=server ID=features DataSourceId=VfiData HorizontalAlign=center >
<ItemStyle BorderWidth="7" BorderColor="#0A2B32" HorizontalAlign=center />
<ItemTemplate>
<vfi:ItemDetail ID=ItemDetail1 ItemID='<%#Container.DataItem("ItemID").ToString %>' runat=server />
</ItemTemplate>
</aspataList>
When I try to run the page i get the following error
Object variable or With block variable not set
It is not passing the value through. I do have a databind set up and if i remove the control and just put <%#Container.DataItem("ItemID").ToString %>, the proper value is displayed.
thanks
<aspataList RepeatColumns="2" runat=server ID=features DataSourceId=VfiData HorizontalAlign=center >
<ItemStyle BorderWidth="7" BorderColor="#0A2B32" HorizontalAlign=center />
<ItemTemplate>
<vfi:ItemDetail ID=ItemDetail1 ItemID='<%#Container.DataItem("ItemID").ToString %>' runat=server />
</ItemTemplate>
</aspataList>
When I try to run the page i get the following error
Object variable or With block variable not set
It is not passing the value through. I do have a databind set up and if i remove the control and just put <%#Container.DataItem("ItemID").ToString %>, the proper value is displayed.
thanks