![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am attempting to get the data that was bound to an item in a Repeater control for use in the ItemDataBound event. Here is the code I am using to attempt to retrieve the data: CType(e.Item.DataItem, DataRowView)("fieldname") This has normally worked for me in the past, but once in a while it gives me a problem for reasons I cannot understand. The error I am recieving is: Object reference not set to an instance of an object. I know that the datatable that I am binding to the Repeater has data in it, because the data is displayed on the page if I comment out this line of the code. Does anybody have any idea what I am doing wrong? Thanks. |
#3
| |||
| |||
|
|
I am attempting to get the data that was bound to an item in a Repeater control for use in the ItemDataBound event. Here is the code I am using to attempt to retrieve the data: CType(e.Item.DataItem, DataRowView)("fieldname") This has normally worked for me in the past, but once in a while it gives me a problem for reasons I cannot understand. The error I am recieving is: Object reference not set to an instance of an object. I know that the datatable that I am binding to the Repeater has data in it, because the data is displayed on the page if I comment out this line of the code. Does anybody have any idea what I am doing wrong? Thanks. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |