Just a simple crap code. I confused with the syntax when I tried to execute that code by clicking on button, page is trying to load but it couldn’t. I tried to load the same page in multiple tabs and I got error “Web server stopped working”! Can anybody correct the syntax of following simple code?
string folderpath = @"C:\Users\Nouser\Documents\Visual Studio 2010\WebSites\folders";
string foldername = TextBox1.Text;
string newPath = System.IO.Path.Combine(folderpath, foldername);
while (Directory.Exists(newPath))
{
foldername = foldername + ik;
ik = ik + 1;
}
System.IO.Directory.CreateDirectory(newPath);
I think what you want is something more like this: