W
Will Chamberlain
I have a footer template for adding items to a database. When 'Add'
button is pressed the footer is displayed with textboxes for inserting
data. There is 1 field that should not be tampered with so I am trying
to display the value in a label. I am using the following code:
<Asp:label id="lblDLID" text='<%# Container.DataItem("DLID") %>'
runat="server" />
In theory this should work like a charm but I am getting the following
error:
---------------
Object variable or With block variable not set.
Exception Details: System.NullReferenceException: Object variable or
With block variable not set.
---------------
I don't understand why I would get this error. The datagrid is bound so
I should be able to grab this value. Am I missing something here? Any
suggestions are welcomed.
- will
button is pressed the footer is displayed with textboxes for inserting
data. There is 1 field that should not be tampered with so I am trying
to display the value in a label. I am using the following code:
<Asp:label id="lblDLID" text='<%# Container.DataItem("DLID") %>'
runat="server" />
In theory this should work like a charm but I am getting the following
error:
---------------
Object variable or With block variable not set.
Exception Details: System.NullReferenceException: Object variable or
With block variable not set.
---------------
I don't understand why I would get this error. The datagrid is bound so
I should be able to grab this value. Am I missing something here? Any
suggestions are welcomed.
- will