开发者

Creating Directory on Server in ASP.NET programmatically

开发者 https://www.devze.com 2022-12-22 17:57 出处:网络
I want to programmatically create a directory on the server using ASP.NET. I have done this using System.IO\'s Directory.CreateDirctory. however, the newly created folder is not accessible in the cod

I want to programmatically create a directory on the server using ASP.NET.

I have done this using System.IO's Directory.CreateDirctory. however, the newly created folder is not accessible in the code.

after searching a bit, I came to know that the newly create folder is not inc开发者_运维知识库luded the project and hence not accessible.


OK...From your answer to my comment I think you can try this thing out:

 images.ImageUrl = "~/Images-" + ObjectName + "/Slide1.png";

Hope this helps...!!


You mention that it is not included in the project. Are you referring to the project in Visual Studio? If so, it will not show up there as it is not a listing of file system directories. It is a listing of project files as build in the proj file. You will need to add it there.

If you are referring to the application then it should be available as soon as it is successfully created.

Please let us know where your issue is happening.


Be careful when modifying the content of the web site in IIS : it detects such modifications and restarts the application immediately.

0

精彩评论

暂无评论...
验证码 换一张
取 消