Imports System.IO Imports System.Net.Mime Partial Class kurumsal Inherits System.Web.UI.Page Private Sub logoindir_Click(sender As Object, e As EventArgs) Handles logoindir.Click Dim fileToDownload = Server.MapPath("~/download/keso-logo.png") Response.ContentType = "application/octet-stream" Dim cd = New ContentDisposition() cd.Inline = False cd.FileName = Path.GetFileName(fileToDownload) Response.AppendHeader("Content-Disposition", cd.ToString()) Dim fileData As Byte() = System.IO.File.ReadAllBytes(fileToDownload) Response.OutputStream.Write(fileData, 0, fileData.Length) End Sub Private Sub rarindir_Click(sender As Object, e As EventArgs) Handles rarindir.Click Dim fileToDownload = Server.MapPath("~/download/keso-winrar.rar") Response.ContentType = "application/octet-stream" Dim cd = New ContentDisposition() cd.Inline = False cd.FileName = Path.GetFileName(fileToDownload) Response.AppendHeader("Content-Disposition", cd.ToString()) Dim fileData As Byte() = System.IO.File.ReadAllBytes(fileToDownload) Response.OutputStream.Write(fileData, 0, fileData.Length) End Sub Protected Function CleanForAttribute(ByVal input As String) As String If String.IsNullOrEmpty(input) Then Return String.Empty Return input.Replace("'", "'").Replace("""", """).Replace("&", "&").Replace("<", "<").Replace(">", ">") End Function End Class