Re: Implementation Data Controls in asp.net hi,
You can use link button to do this…,
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Response.AppendHeader("content-disposition","attachment; filename=" & "1.bmp")
Response.ContentType = "Application/pdf"
'Get the physical path to the file.
Dim FilePath As String = MapPath("1.bmp")
'Write the file directly to the HTTP content output stream.
Response.WriteFile(FilePath)
Response.End()
End Sub
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton> |