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 9015907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:52:00+00:00 2026-06-16T03:52:00+00:00

Using a file upload c# webform to insert some records into database. Any errors

  • 0

Using a file upload c# webform to insert some records into database. Any errors I get I am adding to a list. After all records inserted i use linq to see if the list of errors has anything in it if it does. I write it to another list and then foreach record in this list I write out the error in a label on screen. Get the error in the linq to list that Object not set to an instance of an object.

List<Cups> errors = FDloads.Where(c => c.DataErrors.Count > 0).ToList();

        if (errors.Count > 0)
        {
            Label1.Text = "Errors:";
            foreach (Cups err in errors)
            {
                Label1.Text += "<br/>" +  err.Lion + "," + err.Value;
            }
        }
        else
        {
            Label1.Text = "Success.";
        }

Errors happens write at linq line when I write the errors count in list FDloads to a new list and if it contains anything do this, if not do this…

  • 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-16T03:52:01+00:00Added an answer on June 16, 2026 at 3:52 am

    Please try:

    List<Cups> errors = FDloads.Where(c => c.DataErrors != null && c.DataErrors.Count > 0).ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using this file upload example to upload some files in the database.
i have saved the pdf file to the database using file upload . now
I am Uploading a file into a webserver using File upload API it works
I want to get complete file path using file upload control. I want to
I am uploading a file by using file upload control. After successful upload, when
When using IE browser and trying to upload file using File.SaveAs method I get
I am using Phonegap file upload to upload SVG files to my server. It's
I was using a File Upload functionality in ASP.NET .If the users are using
I am using the jQuery-File-Upload widget (although I believe this question can generalize to
im trying to do a file upload using http post but when I try

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.