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

  • SEARCH
  • Home
  • 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 7193735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:13:49+00:00 2026-05-28T20:13:49+00:00

there are nothing is inside my test002 folder, by right my output should be

  • 0

there are nothing is inside my test002 folder, by right my output should be is “nothing is inside the folder”,but after compile there are nothing prompt.

what i want to do is if there are any .doc file is inside my folder, just upload it
if there are nothing is inside the folder, ask user to upload .doc to required folder.

protected void Button3_Click(object sender, EventArgs e)
{
    try
    {
        string[] chkUserResume = Directory.GetFiles(HttpContext.Current.Server.MapPath(@"~/Enduser/test002/"), "*.doc");

        if (chkUserResume!=null)
        {

            foreach (string name in chkUserResume)
            {
                Response.Write(name + " is exist");
            }
        }
        else
        {
            Response.Write("nothing is inside the folder");
        }



    }
    catch (Exception ex) 
    { 
        Response.Write(ex.Message.ToString());
    }


}
  • 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-05-28T20:13:50+00:00Added an answer on May 28, 2026 at 8:13 pm

    The null keyword means that the variable is not set to any real value, which is different from an empty array.

    In this case, chkUserResume will never be null, it will be an empty array. You should check that chkUserResume.Length is 0 instead.

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

Sidebar

Related Questions

I have a for-each and when there is nothing output by it I would
i want to split the searchrequest into parts, if there's nothing to find. example:
i know nothing about medical records but im sure there's great opportunity in it
All my searches returned nothing and I find it odd that there aren't any
I followed the instructions in this site but there's no such code inside the
I know it may sound like a weird question, but is there any .NET
this is killing me but is there any simple way to have objective-c code
There is nothing like the 43rd day of your life spent tracking down issues
Seems there's nothing to do… using the combo prototype/lowpro, no problems at all with
What if there is nothing that matches the get? Then it returns in an

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.