Hi,
I have a DataList..that contains a Template like so.
This template contains a user control:
This control has a property, that retrieves it value from the DataSource
associated with the DataList.
<ItemTemplate>
<MyControl:Test ID="myControl" intID="<%# Container.Dataitem("myID")%>"
Runat="server"/>
</ItemTemplate>
Problem:
When calling the User Controls DataBind method, the property in question
(intID="<%# Container.Dataitem("myID")%>") is causing an error:
System.NullReferenceException: Object variable or With block variable not
set.
Can anyone help me fix!!!
Cheers,
Adam
Jon - 15 Feb 2006 09:13 GMT
Might be best if you supply the code to the user control also?
> Hi,
>
[quoted text clipped - 18 lines]
> Cheers,
> Adam