Пример #1
0
 protected void UploadButton_Click(object sender, EventArgs e)
 {
     if (FileUploadControl.HasFile)
     {
         try
         {
             string filename = Path.GetFileName(FileUploadControl.FileName);
             FileUploadControl.SaveAs(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + filename);
             usuarioControlador.cargaMasivaUsuarios(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + filename);
             StatusLabel.Text = "Upload status: File uploaded!";
         }
         catch (Exception ex)
         {
             StatusLabel.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
         }
     }
 }