Is this an error or C# defalt value ?
How to slove this problem ?

Recommended Answers

All 4 Replies

From MSDN on HttpRequest.Files:

Gets the collection of files uploaded by the client, in multipart MIME format.

If the client has uploaded no files, the number of files uploaded is zero.

I'm not sure why this is a problem.

Maybe you can elaborate more on this issue. Did you expect a different value when there is no uploaded file?

Because its an int, which defaults to 0.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.