Friday, February 29, 2008

Creating a folder in the server using asp.net -sanjeewa sapumana

//Check folder is exist
DirectoryInfo dInfo = new DirectoryInfo
(Server.MapPath( strMediaFileSavePath));

//Create Folder and add files
if (!dInfo.Exists)
{
//dInfo.CreateSubdirectory("@"+strMediaFileSavePath);
System.IO.Directory.CreateDirectory
(Server.MapPath(strMediaFileSavePath));


if (this.AddVideo())
{
return true;
}
else
{
return false;
}
}

No comments: