Free Support Forum - aspose.com

ASP/VB .NET sending multiple PPT files through a stream - slides

I have a simple problem I was hoping someone knew the answer to. I have created a set of web pages that acts like the user is downloading multiple PPT files. I want to generate 1 to N different PPT files and send them to the user through the Response.OutputStream. I can only get one sent to the user.

The code kind of looks like this:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
createMultiplePPTs()
End Sub
Private pres As Presentation

Private Sub createMultiplePPTs()
Dim intColectionfield As New Collection
intColectionfield.Add(“1”)
intColectionfield.Add(“2”)
intColectionfield.Add(“3”)
'…
intColectionfield.Add(“N”)

for each intField as integer in intColectionfield
pres = New Presentation(PathtoFile + “\” + filename)
’ load the presentation (intField) (Much code removed)
Dim st As System.IO.Stream = Me.Response.OutputStream
pres.Write(st)
'st.Flush()
'I have tried with and without the flush.
next

I only get 1 back when I do this. Does anyone have any idea what I’m doing wrong, and how to send the N files back to the user?


I don’t think, it is possible, but you may try to zip your files and send one single zip file via stream.