|
-
Mar 11th, 2004, 03:07 AM
#1
Thread Starter
Lively Member
"redirect/work on same page" after response.binarywrite
the following code throws an excel file to the client....but after throwing the file...I would like to redirect to another page...which could not me done...
--------------------------------------------------------------------------
Dim response As HttpResponse = pg.Response
response.ContentType = "application/ms-excel"
response.AddHeader("content-disposition", "attachment;filename=report.xls")
Dim SourceFile As System.IO.FileStream = New System.IO.FileStream(FN, IO.FileMode.Open)
Dim FileSize As Long = SourceFile.Length
Dim getContent(CType(FileSize, Integer)) As Byte
SourceFile.Read(getContent, 0, CType(SourceFile.Length, Integer))
SourceFile.Close()
response.BinaryWrite(getContent)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|