Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linked button
Message
From
13/10/2006 15:00:52
Evans Carl
System Answers Consulting, Inc
Big Lake, Minnesota, United States
 
 
To
12/10/2006 11:47:25
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01161500
Message ID:
01161891
Views:
13
>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,
Previous
Reply
Map
View

Click here to load this message in the networking platform