I have a gridview. Its datasource is set as follows.
dtTable
is a datable in which the values for the table will be retrieved. But when setting dtTable
as datasource I get an error "Object reference not set to an instance of an object". What may be the reason for this?
gridview.Datasource = dtTable
gridview.Databind()