Upload Multiple Files with C#

Hi,

I’m very new to ASP.NET and would really appreciate some pointers with this issue I’ve been having.

I have 8 file fields in my form and when the user submits the form, I would like to loop through all these fields and ‘save’ any files to my server.

All fields are optional so any one of them could contain files.

Can someone show me how I can do this?

I plan to ultimately then store each filename in a particular column in a table in my database.

My table structure is:
img1 | img1small | img2 | img2small | img3 …and so on…

So img1 field filename would be stored in img1 and so on.

Many thanks for any guidance with this

multiple files upload using one HttpInputFile control
developer use the <input type=file/> in the html code:)

there are tons of references around. you could google it easily.

anyways here is one from ms Uploading Files in ASP.NET 2.0