Nitin Bhardwaj

Nitin Bhardwaj

  • NA
  • 15.9k
  • 13m

Create Directory in ASP.Net

Nov 29 2013 12:39 AM
Hi,
I wann to create runtime directory in root folder. By this code
 string strDate = DateTime.Now.ToString("d-M-yyh:mm:ss.ffftt").ToString();
 Directory.CreateDirectory(Server.MapPath("~/Images/Work/") + ddl_category.SelectedItem.Text).CreateSubdirectory(strDate);

But i am getting some error. so please me, How to Create directory with its sub folder at runtime.

Answers (9)