file upload at diff locations

P

puja

hi all,

I have website build using c# where I have 3 images in my homepage. I have a
table called images where I store the physical path of all 3 images.
eg: Image1 --> C:\StoreImages\User1\Image1.jpj
Image2 --> C:\StoreImages\User1\Image2.jpj
Image3 --> C:\StoreImages\User1\Image3.jpj

When my website loads, I read this table to populate images.

Now my requirement is such that users who have account with my website, can
actually upload their own images and have it display on homepage after they
have logged in. So home page images will be different for all users.
I have Admin.aspx page where user can upload their own image.

My problem starts here.

I store all images on C:\StoreImages\...
If a new user gets registered, then I want to create a new folder called
User1 at C:\StoreImages\User1\ and store all images here.
If a registered user logs in, then I would like to search C:\StoreImages
folder for RegisteredUser and then replace images for that user.

I don't know how i can create new folder for new user and search folder for
exiting user.

Could anyone please help ?

thanks
puja
 
G

Guest

To resolve, create a directory for each user account with it's id
name(unique) in C# you have System.IO.Directory class which will help you,
you can always search if the direcytory exisits else create and display the
picture.

Raj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top