locked
Object Reference RRS feed

  • Question

  • User-808020646 posted

    I simply copied the code from one code behind form to another. And this is the error I recieved.  I had a Gridview control in my form. This is the object that it was giving me an error on.Thanks for any help.

    Reference to a non-shared member requires an object reference. 

    Wednesday, March 31, 2010 4:47 PM

Answers

  • User-925904572 posted

    whatever objects the code-behind is trying to access should also be on the corresponding ASPX page with the IDs the same as the code behind. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 31, 2010 6:30 PM
  • User1282917655 posted

    post your code


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 1, 2010 6:06 AM

All replies

  • User-925904572 posted

    whatever objects the code-behind is trying to access should also be on the corresponding ASPX page with the IDs the same as the code behind. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 31, 2010 6:30 PM
  • User1282917655 posted

    post your code


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 1, 2010 6:06 AM