there are two pages involved, webform1.aspx and HiRes.aspx. In
Webform1.aspx I write a .jpg to the root of d: and do :
Server.Transfer("HiRes.aspx")
HiRes.aspx is as follows:
<%@ Page Language="vb" ContentType="image/jpeg" AutoEventWireup="false"
Codebehind="HiRes.aspx.vb" Inherits="DBAPhotoQuery.HiRes"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>test</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="
http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" target="_blank" method="post" runat="server">
</form>
</body>
</html>
and the CodeBehind for hires.aspx is as follows:
Imports System.Drawing.Imaging
Public Class HiRes
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.Clear()
Dim oBmp As Bitmap
oBmp = New Bitmap("d:\bigpic.jpg")
oBmp.Save(Response.OutputStream, imageformat.jpeg)
Response.End()
End Sub
End Class
What happens is that the picture does indeed get written but to
webform1.aspx. What was in webform1.aspx is completely replaced by just the
image. You might notice that I put Target="_blank" in an attempt to get it
to display a new i.e. page.
Thanks,
T