Hi all,
I am creating a web application on web matrix.I have a
datagrid.I have the following code :
DataTable dt=(DataTable)Session["DataGrid"];
DataRow dr = dt.NewRow();
DataView dv;
First it was giving correct result.After that I run the same code then
it is giving the following error message :
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
for the line DataRow dr = dt.NewRow();
what can be the problem??
Any ideas???
Elton Wang - 25 Dec 2005 15:08 GMT
Error itself shows that there is no data in Session["DataGrid"]. Check if
you save datatable to the Session before you retrieve it.
HTH
> Hi all,
> I am creating a web application on web matrix.I have a
[quoted text clipped - 14 lines]
> what can be the problem??
> Any ideas???