M
Mr Ideas Man
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
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