This commit is contained in:
Antonio Gonzalez
2020-07-02 09:24:13 -07:00
parent dea0271d72
commit 3cd5b6d57d

View File

@@ -1684,11 +1684,22 @@ Partial Class Sistemas_Empresa
If Not TieneError Then
Alert("Certificado cargado con exito")
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))
End If
TxtCargaImg.getfiles().Archivos = Nothing
UpAddArchivo.Update()
End Sub
Protected Sub LbArchivoKeyDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoKeyDescarga.Click
Dim FilePath As String = String.Format("{0}Empresas\{1}\Certificados\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, TxtArchivoKey.Text)
'Dim fi As New FileInfo(File)
Dim byteArray As Byte() = File.ReadAllBytes(FilePath)
UpAddArchivo.Update()
End Sub
'HttpContext.Current.Response.Clear()
'HttpContext.Current.Response.ClearContent()
'HttpContext.Current.Response.ContentType = "application/octet-stream"
'HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment filename=prueba.docx")
'HttpContext.Current.Response.AddHeader("Content-Length", byteArray.Length.ToString())
'HttpContext.Current.Response.OutputStream.Write(byteArray, 0, byteArray.Length)
'HttpContext.Current.Response.End()
Response.Buffer = True
Response.Clear()