U
ultraweaver
Hi,
I have a datalist and a gridview nested in the item template and trying
to bind the gridview to the datalist. I am getting teh error...
System.NullReferenceException: Object reference not set to an instance
of an object.
I am uncertain as to why. I have data. I am following this quick start
file (but with my own data).
http://dotnetjunkies.com/QuickStart...pnet/samples/data/NestedMasterDetailsList.src
Here is my sub...
Protected Sub DataList1_ItemDataBound(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.DataListItemEventArgs)
Dim s As SqlDataSource = e.Item.FindControl("SqlDataSource2")
s.SelectParameters("InvoiceID").DefaultValue =
e.Item.DataItem("InvoiceID")
End Sub
The error happens on the line
"s.SelectParameters("InvoiceID").DefaultValue =
e.Item.DataItem("InvoiceID")".
Any ideas?
I have a datalist and a gridview nested in the item template and trying
to bind the gridview to the datalist. I am getting teh error...
System.NullReferenceException: Object reference not set to an instance
of an object.
I am uncertain as to why. I have data. I am following this quick start
file (but with my own data).
http://dotnetjunkies.com/QuickStart...pnet/samples/data/NestedMasterDetailsList.src
Here is my sub...
Protected Sub DataList1_ItemDataBound(ByVal sender As Object, ByVal e
As System.Web.UI.WebControls.DataListItemEventArgs)
Dim s As SqlDataSource = e.Item.FindControl("SqlDataSource2")
s.SelectParameters("InvoiceID").DefaultValue =
e.Item.DataItem("InvoiceID")
End Sub
The error happens on the line
"s.SelectParameters("InvoiceID").DefaultValue =
e.Item.DataItem("InvoiceID")".
Any ideas?