In my application,I want to create a first folder where user can upload all videos.
next to this folder there should be new button add when click on that add new folder should generate and user can give any name to it.
and inside that he can save some text docs or images or anything.
How to create such a folders?
How to create folder in aspx page?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Munesh SharmaRank #174 · 13.9K reputationPosted Apr 8, 2014, 10:57 PM EDT
First of all be sure that you are importing/using (depending on language) the System.IO namespace for this to work. But what you can do is something like this
string pathToCreate = "~/UserFolders/" + TextBox1.Text;
if(Directory.Exists(Server.MapPath(pathToCreate))
{
//In here, start looping and modify the path to create to add a number
//until you get the value needed
}
//Now you know it is ok, create it
Directory.CreateDirectory(Server.MapPath(pathToCreate));