D
David C
I am trying to default the SelectedValue of a DropDownList control to a
value stored in a cookie. I am getting the following error:
"Object reference not set to an instance of an object."
The error is occurring in the code behind page on the line below for the
ddl.SelectedValue = ....
If Not Request.Cookies("mystaffid") Is Nothing Then
'default task FROM to value in cookie (current user)
ddl = row.FindControl("ddlEnteredBy")
ddl.SelectedValue = Request.Cookies("mystaffid").ToString
End If
Thanks.
David
value stored in a cookie. I am getting the following error:
"Object reference not set to an instance of an object."
The error is occurring in the code behind page on the line below for the
ddl.SelectedValue = ....
If Not Request.Cookies("mystaffid") Is Nothing Then
'default task FROM to value in cookie (current user)
ddl = row.FindControl("ddlEnteredBy")
ddl.SelectedValue = Request.Cookies("mystaffid").ToString
End If
Thanks.
David