Search This Blog

Friday, April 16, 2010

Exception: Invalid attempt to call FieldCount when reader is closed.

Exception: "Invalid attempt to call FieldCount when reader is closed"

Cause: When you attempt to bind data to a control within RowCreated event of a gridview.

Solution: Bind data to a control within RowDataBound event of a gridview instead of RowCreated event.

No comments:

Post a Comment