.Net Asp.Net MVC C# Development

If Directory/Folder not exists

 if (!System.IO.Directory.Exists(Server.MapPath("~/UploadedFiles")))  //creating a new directory if not exists
     {                 System.IO.Directory.CreateDirectory(Server.MapPath("~/UploadedFiles"));
      }

Leave a Reply

Your email address will not be published. Required fields are marked *