Application Web VB2008 : est-il possible de provoquer le téléchargement vers l'utilisateur de plusie

G

Gilbert Tordeur

Bonjour.

Mon application Web génère plusieurs fichiers pdf, que l'utilisateur doit
télécharger sur son poste local.

Pour provoquer le téléchargement du premier fichier, je fais :

Dim warnings() As Warning = Nothing
Dim mimeType As String = ""
Dim encoding As String = ""
Dim fileNameExtension As String = ""
Dim streams() As String = Nothing

Dim pdfContent As Byte() = reportViewer.LocalReport.Render("PDF" _
, Nothing _
, mimeType _
, encoding _
, fileNameExtension _
, streams _
, warnings)

'Renvoi du PDF
'Me.Context.Response.Clear()
Me.Context.Response.ContentType = "application/pdf"
Me.Context.Response.AddHeader("Content-disposition" _
, "attachment; filename=FicheAcceptationOffre_" _
& .Offre.NumOffre.ToString _
& ".pdf")
Me.Context.Response.BinaryWrite(pdfContent)
Me.Context.Response.End()

Code obtenu par recopie d'un exemple, et auquel je ne comprends à peu près
rien.

Questions : 1) comment provoquer le téléchargement des fichiers suivants ?
2) Comment spécifier quelle page html afficher à
l'utilisateur après le téléchargement ?
3) (autre possibilité) Comment créer en VB un fichier .zip
avec tous les fichiers à télécharger ?

Merci de votre aide,
Gilbert
 
G

Gillard

franchement je crois que le minimum c'est de poster dans la langue du
newsgroup
ou de trouver le newsgroup correspondant à ta langue

pour le français il vaut mieux poster dans

microsoft.public.fr.dotnet.vb :))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel - erreur Automation 8

Top