locked
Object reference not set to an instance of an object RRS feed

  • Question

  • User-719096930 posted

    Hi guys!

    I have this error, below is a link to the screenshot of the error.

    http://bit.ly/xLtMdv

    If you need anymore code, please ask! Thanks!

    Matt

    Thursday, January 5, 2012 12:26 PM

Answers

  • User-1360095595 posted

    Show your markup, and where lblError is.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 5, 2012 1:23 PM

All replies

  • User-1604169926 posted

    try this,

    lblError.Text = "Exception in DB Handler" + error.Message;

    or if it doesn't help, please paster your code here..
    Thursday, January 5, 2012 12:54 PM
  • User-719096930 posted

    Hi there!

    Thanks for the suggestion, unfortunately, that generated the same error. Here is the code I used

    Thursday, January 5, 2012 1:15 PM
  • User-401756089 posted

    I guess error here at the "lblError.Text" part.

    So lblError can be null.

    Verify that this label is exists.

    Or try to find it with method FindControl(): http://msdn.microsoft.com/en-us/library/486wc64h.aspx

    Thursday, January 5, 2012 1:20 PM
  • User-1360095595 posted

    Show your markup, and where lblError is.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 5, 2012 1:23 PM
  • User-719096930 posted

    Found the error now, there was an onclick which was getting in the way somehow.

    Thanks for the help people! :)

    Thursday, January 5, 2012 1:27 PM