A
AlecL
Hi,
I am trying to load control as a record is being updated in a backend
database. The codes reads like this:
Dim ds As DataSet
CType(Page.FindControl("ddlStatus"),
DropDownList).SelectedValue = _status
Dim sql As String = "select * from _loanApp where status=" &
_status
ds =
SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings("DSN"), _
CommandType.Text, sql)
CType(Page.FindControl("dgList"), DataGrid).DataSource = ds
CType(Page.FindControl("dgList"), DataGrid).DataBind()
but it is giving me this error.
System.NullReferenceException: Object reference not set to an instance
of an object.
The stack trace reads:
[NullReferenceException: Object reference not set to an instance of an
object.]
Any help is appreciated.
I am trying to load control as a record is being updated in a backend
database. The codes reads like this:
Dim ds As DataSet
CType(Page.FindControl("ddlStatus"),
DropDownList).SelectedValue = _status
Dim sql As String = "select * from _loanApp where status=" &
_status
ds =
SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings("DSN"), _
CommandType.Text, sql)
CType(Page.FindControl("dgList"), DataGrid).DataSource = ds
CType(Page.FindControl("dgList"), DataGrid).DataBind()
but it is giving me this error.
System.NullReferenceException: Object reference not set to an instance
of an object.
The stack trace reads:
[NullReferenceException: Object reference not set to an instance of an
object.]
Any help is appreciated.