Photo file upload C#

Does anyone know how to do a file upload so that the file is added to a gallery for 4 C#?

so when a user uploads a file they see it in a gallery right away.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Best way: Upload the image and stored in a folder with unique name.
Store the image path in database table and during page load, read all pic file path for login user
and display in your web page.

You can store the image in database, but it will make large DB. It took more space.

Let me know if you have any question.
You can see below URL for reference:

Good Luck
razza_bAuthor Commented:
Is there any other way to store it other than db if it makes db very large?
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

You need to choose which one is gonna be large, the db or the application... i guess it's better to store it in a db line than physically inside the application's directory.

After choosed, you can use a jQuery plugin to have a good visual result.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
For the application like your application (Pic gallery) , Storing image in file system (In a physical folder) easiest and the best way.

There are some advantages and disadvantages in both. But for web application, file system is best.

Please see below URL.
You can store in physical folder with unique name for every image.

Like ../Images/image_1_1234.jpg

During upload, you just need to assign unique name to the image file and move into Image folder. Just store the reference
path for uploaded image in database table.
razza_bAuthor Commented:
Thanks for feedback guys.

tbsolutions - I like the carousel look, would this be the only code needed to do this from this page?...
Getting Started Section....
Dynamic content loading Section..
Accessing the jCarousel instance Section..

gdupadhyay: I think i'd prefer the file system but do you have any code examples of how to do file upload and having it displayed using this method?

And would the carousel pick load up the photos from the file system?

You just need to follow the file upload process, both are same.

See for example:

Save the file path in a table and each file (pic) should be refer to user.

After saving, you just need to read all the pic file for the user and display into screen.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.