ASP.net Object reference not set to an instance of an object

Murray Brown
Murray Brown used Ask the Experts™
on
Hi in ASP.net I am getting the error "Object Referenc not set to an instance of an object" in the following line of code.
The Gridview is definitely there and has data. What might cause this?

            For i As Integer = 0 To Me.GridViewData.Rows.Count - 1

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Team Lead
Commented:
For i As Integer = 0 To Me.GridViewData.Rows.Count - 1
This looks ok for me.

What might cause this?

Try to rebuild your asp.net solution and see if you got any errors there? Else, I would suggest you put in some break points in your codes for debugging.
Murray BrownASP.net/VSTO Developer

Author

Commented:
Thanks very much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial