Let's start by debugging someone's code :-) An error occurs when a code subroutine tries to export data from gridview to an excel file.
GridView gv = new GridView();
Table table = new Table();
int maxRow = 60000;
int gvrow = Data().Tables[0].Rows.Count;
An error occurs in Data (). Tables [0] .Rows.Count
Error in the nearest window
:? Data(). Tables [0] .Rows.Count
In System.Data.dll, the first exception of type "System.FormatException" 'Data ()' has a value of null
Error message:
Correction System.NullReferenceException was not processed by user code Message = "The reference to the object is not installed in the object instance."
Any ideas what is wrong here?