We need to save :-
Filename nvarchar(150),
FileData Image,
contentType nvarchar(max),
FileLength int
In database i am using SQL server 2008
now just use this mehod.
Protected Sub Download_File(ByVal fileName As String, ByVal contentType As String, ByVal fileData As Byte(), ByVal fileLength As Integer)
Try
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName.Replace(" ", "_").ToString)
Response.ContentType = contentType
Response.OutputStream.Write(fileData, 0, fileLength)
Response.End()
Response.Flush()
Catch ex As Exception
Throw ex
End Try
End Sub
This is also a good code to remember.
Filename nvarchar(150),
FileData Image,
contentType nvarchar(max),
FileLength int
In database i am using SQL server 2008
now just use this mehod.
Protected Sub Download_File(ByVal fileName As String, ByVal contentType As String, ByVal fileData As Byte(), ByVal fileLength As Integer)
Try
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName.Replace(" ", "_").ToString)
Response.ContentType = contentType
Response.OutputStream.Write(fileData, 0, fileLength)
Response.End()
Response.Flush()
Catch ex As Exception
Throw ex
End Try
End Sub
This is also a good code to remember.
Hum...... Good.
ReplyDeleteThanx follow this blog if you like it
Deletehttp://networkedblogs.com/blog/lalitsoft_total_software_and_website_solutions/?ahash=ef1759cb05d4cc10b0feb2cf905ebe13