Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7786581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:26:24+00:00 2026-06-01T20:26:24+00:00

Beating my head against the wall on the error Object reference not set to

  • 0

Beating my head against the wall on the error Object reference not set to an instance of an object.
See code below. The offending line is marked with <!—>>>>>>>

string htmlOutput = " ";

    htmlOutput +=  "<h3>employee: " + employee.lastName + ", " + employee.firstName + " (" + thisForm.employeeID + ")</h3>" +
        "<h3>Submitted To: " + thisForm.boss + "</h3>" +

    if (job1.JRN != "" || job1.JRN != "INVALID")
    {
        <!--->>>>>>>htmlOutput += "<hr /><h4>Job 1</h4> " + "<h3>" + database.getjobName(job1.JRN) + " (" + job1.JRN + ")</h3>";
        htmlOutput += "<h3>Date of Last Attendance: " + job1.month + " " + job1.day + ", " + job1.year + "</h3>";
        htmlOutput += "<h3>Pass/Fail: " + job1.passFail + "</h3>";
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:26:25+00:00Added an answer on June 1, 2026 at 8:26 pm

    Use String.Format("{0}{1}", obj1, obj2 ?? ""). And use debugger, put breakpoint to this line and inspect objects, then add validation logic. Maybe the problem is in database.getjobName method code. You can always use the null coalescing operator. Never use string concatenation like in your example, it’s very ugly and error prone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, beating my head against the Javascript/jQuery wall over here, here is the code,
I'm currently beating my head against a wall trying to figure this out. But
I'm beating my head against a wall on this one; the logo image (It's
So, I've been beating my head against the wall of this issue for several
I feel like I'm beating my head against a brick wall sometimes. I was
I'm beating my head against the wall trying to figure this out. I have
So I have beating my head against the wall on this. I feel like
Been beating my head against a wall trying to get this to work -
I've been beating my head against the wall trying to get this to work,
Been beating my head against a wall and figured it was time to post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.