473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
Aug 27 '08 #1
2 1319
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 :))


"Gilbert Tordeur" <gi*************@jci.comwrote in message
news:OJ**************@TK2MSFTNGP02.phx.gbl...
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
Aug 27 '08 #2
Error in the newsgroup choice ;) I am sorry.
Gilbert

"Gillard" <gillard_georges@@@@@@@@@hotmail.coma écrit dans le message de
news: Ot**************@TK2MSFTNGP04.phx.gbl...
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 :))


"Gilbert Tordeur" <gi*************@jci.comwrote in message
news:OJ**************@TK2MSFTNGP02.phx.gbl...
>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

Aug 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Philippe Couillez | last post by:
Greetings, Our company, AVE Intervision, is looking for people across the world willing to participate in the beta testing of our application VCR (Virtual Class Room). VCR is a new...
7
by: Arthur Dent | last post by:
Does anyone know where i can find a decently thorough list of the language changes in VB2008, such as the new If() function? All i can seem to find through search engines, most of the articles...
2
by: Arthur Dent | last post by:
I am trying to make a VB2008 Express winforms project, and edit the form. However, when i try to open the form, i get this error: ..NET Framework 2.0 update not found. The win32manifest will not...
6
by: Academia | last post by:
I have a computer at home with a (slow) dialup connection and a computer at school with a fast connection. I want to go there (it is not close) and down load Vb2008 express, burn it into a CD,...
8
by: Galen Somerville | last post by:
My graphics involves a lot of line drawings in a short period of time. I have all the graphics in a separate module. I repeatedly get the pixel data from a USB device, draw the requisite traces,...
5
by: YouPoP | last post by:
I have an MFC application (VS2005) with splitter window (one is the view other is a formview). you can select from the main menu different math operation on polynoms and polynoms shows on the...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
2
by: Gilbert Tordeur | last post by:
Hello, My Web application in VB2008 with IIS calls Excel (2003) to create an Excel file xls. I use therefore Microsoft.Office.Interop.Excel, version 11. This application does not use anonymous...
2
by: Gilbert Tordeur | last post by:
Hello, My Web application in VB2008 with IIS calls Excel (2003) to create an Excel file xls. I use therefore Microsoft.Office.Interop.Excel, version 11. This application does not use anonymous...
0
by: John Dann | last post by:
Looking to migrate from VB2005 Pro to VB2008. Can anyone suggest/recommend a VB2008 book that highlights the changes from earlier versions of VB.Net (VB2003/2005) rather than describing VB2008...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.