I have noticed today that when you create a directory in code in a web application the resulting folder structure is not created in the solution explorer (It is fine on disk and app can still access all the files)
I am not sure if there is a setting that I am missing or is this a bug?
Steps to reproduce
Create a new C# web application in VS 2010.
Create a new web page (Default.aspx) and add a file upload control and a button.
on the click event on the button add the following code
String ImageUrlPath = "/Media/Photo/";
Directory.CreateDirectory(Request.PhysicalApplicationPath + ImageUrlPath);
string FileName = FileUpload1.FileName.ToString().Replace(" ", "");
FileUpload1.SaveAs(Request.PhysicalApplicationPath + ImageUrlPath + FileName);
When the form posts back refresh the solution explorer and the new directory does not appear.
Check your file system and the file will be there.
Not a massive issue but frustrating. Any guidance would be appreciated
View Complete Post