AjaxControlToolkit.AsyncFileUpload.SaveAs C# (CSharp) Метод

SaveAs() публичный Метод

Saves the content of an uploaded file.
public SaveAs ( string fileName ) : void
fileName string Uploaded file name
Результат void
        public void SaveAs(string fileName)
        {
            PopulateObjectPriorToRender(this.ClientID);
            var file = CurrentFile;
            file.SaveAs(fileName);
        }

Usage Example

Пример #1
0
 public static string SaveImageAsync(AsyncFileUpload Fu, string prefix, string localImagePath)
 {
     if (!Directory.Exists(localImagePath))
         Directory.CreateDirectory(localImagePath);
     string strImage = string.Empty;
     string SavePath = string.Empty;
     //SavePath = GetImagePathWithFileName(3, prefix, localImagePath);
     SavePath = localImagePath;
     SavePath += '\\' + prefix;
     Fu.SaveAs(SavePath);
     Fu.FileContent.Dispose();
     strImage = SavePath;
     //Fu.PostedFile.ContentLength
     return strImage;
 }
All Usage Examples Of AjaxControlToolkit.AsyncFileUpload::SaveAs