Insert record using Gridview Footer

H

Hennie

I have a textbox in the Footer of a Gridview.
When I run an insert command I get the following error:
"
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.

Source Error:

Line 87:
Line 88:
Line 89: Dim strOperatorID As String =
CType(GVProgram.FooterRow.FindControl("ddlOperatorID"),
DropDownList).SelectedValue

"

What is wrong with the code?

Thanks
Hennie
 
H

Hennie

Dim strOperatorID As String = CType(GVProgram.FindControl("ddlOperatorID"),
DropDownList).SelectedValue

Is not helping either
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top