Click here to Skip to main content
15,886,629 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
hi..
i want to create folders as by userid..
Programatically create directory for new user on web site

when user create new account then his/her photos upload his/her folder
like
when user create new account and register succesfully then
his/her userid is like = "111"

when user uploads his/her photos then his/her photos store in "111" directory.
.
when new account generated and userid is "112"
then its images stored u=in 112 directory.

how to possible..
give me some coding hint pls
Posted
Updated 23-Feb-14 19:26pm
v2
Comments
Sergey Alexandrovich Kryukov 24-Feb-14 1:26am    
What is your problem?
—SA
Pankaj Nikam 24-Feb-14 1:52am    
Can you give us what exactly is not working?
I smell this as a homework question. Is it so?

1 solution

Well, I think you can perform what you want with the help of following.


C#
string fileUploadPath = "D:/";


 if (!Directory.Exists(fileUploadPath + userid + "\\"))
                    {
                        Directory.CreateDirectory(fileUploadPath + userid  + "\\");
                    }




Hope it will help. :)
 
Share this answer
 
Comments
Manish Dalwadi 24-Feb-14 6:38am    
thanks
VICK 24-Feb-14 6:40am    
You are welcome. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900