Skip to content

Instantly share code, notes, and snippets.

@tkMageztik
Created June 24, 2013 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkMageztik/5854776 to your computer and use it in GitHub Desktop.
Save tkMageztik/5854776 to your computer and use it in GitHub Desktop.
Guardar Archivo en servidor
if (AsyncFileUpload1.HasFile)
{
//Copiar Archivo
string targetPath = @"\\servidor\carpeta_guardar_pdf\";
string _archivo = targetPath + System.IO.Path.GetFileNameWithoutExtension(AsyncFileUpload1.FileName) + System.IO.Path.GetExtension(AsyncFileUpload1.FileName);
AsyncFileUpload1.PostedFile.SaveAs(_archivo);
string ruta = System.IO.Path.GetFileName(_archivo);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment