View Single Post
  #38 (permalink)  
Old 08-08-2007, 07:44 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 350
Venkat is on a distinguished road
Thumbs up 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>
Reply With Quote