Пример #1
0
 protected void CreateFolderButton_Click(object sender, EventArgs e)
 {
     Page.Validate("foldergrp");
     if (!Page.IsValid)
     {
         return;
     }
     try
     {
         string newfolder = FolderPath;
         if (newfolder == string.Empty)
         {
             newfolder = FolderTextBox.Text.Trim();
         }
         else
         {
             newfolder = string.Format("{0}/{1}", newfolder, FolderTextBox.Text.Trim());
         }
         DM.CreateDriveFolder(newfolder, DriveItemType.Folder);
         Response.Redirect(string.Format("managedrive.aspx?folderpath={0}", FolderPath));
     }
     catch (Exception ex)
     {
         message1.Text     = string.Format("Unable to create folder. Please avoid \\ / : ? * \" &gt; &lt; |<br/>Error: {0}", ex.Message);
         message1.Indicate = AlertType.Error;
         message1.Visible  = true;
     }
 }