>I create a table on the asp.net (web page)
>there are two column , Invoice Number and download link button.
>When the user click the button, the correponsed pdf will be shown.
>How can I do that ??
>Thanks a lot
> Do While drRv.Read
> Dim r As New TableRow()
> Dim i As Integer
> Dim c As New TableCell()
> c.Controls.Add(New LiteralControl(drRv.Item("number")))
> r.Cells.Add(c)
> c = New TableCell()
> Dim btnDownload As New LinkButton <-- ???
> btnDownload.Text = "DownLoad"
> btnDownload.Site = "/wto_web_doc/" + drRv.Item("hawbno") + ".pdf"
> c.Controls.Add(btnDownload)
> r.Cells.Add(c)
> 'Next i
> Me.tbInvoice.Rows.Add(r)
> Loop
>
> End Sub
>End Class
Agnes,
You can used the response write to do it.
Response.AddHeader "Content-Disposition", "attachment; filename=YourFileName.pdf"
Response.ContentType = "application/pdf"
Response.Buffer = True
Response.BinaryWrite YourFileName.pdf
Response.End
Carl
¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°¤º°`°º¤ø¤º°¤º°
Carl Evans
CEO & President
System Answers Consulting, Inc.
MCSD .NET, ASP.NET, C#.NET, VB.NET,