How to give back to an image using "Net/Link" and "asp.net"?

*To*: mathgroup at smc.vnet.net*Subject*: [mg46834] How to give back to an image using "Net/Link" and "asp.net"?*From*: albert_666 at hotmail.com (Roger)*Date*: Tue, 9 Mar 2004 19:57:47 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

I need aid to create a graph in mathematica and to place it in a page aspx being used Net/link and asp.net I have two paginas aspx WebForm1.aspx and WebFor2m.aspx WebForm1.aspx calls to WebForm2.aspx to obtain an image: < img src="WebForm2.aspx "> The code of "WebForm2.aspx" is the following one: Imports System.Drawing Imports System.Drawing.Imaging Imports Wolfram.NETLink Public Class WebForm2 Inherits System.Web.UI.Page Private mathkernel As New Wolfram.NETLink.MathKernel Dim resultado As String Private Sub Page_Load(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles MyBase.Load Response.ContentType = "image/gif" If (mathkernel.IsComputing()) Then mathkernel.Abort() Else mathkernel.GraphicsHeight = 200 mathkernel.GraphicsWidth = 300 mathkernel.CaptureGraphics = True mathkernel.Compute("Plot[x,{x,0,1}]") If (mathkernel.Graphics.Length > 0) Then Response.Write(mathKernel.Graphics(0)) End If End If End Sub End Class in time of debugin the variable "mathkernel.Graphics.Length" is equal to 1, but profit not to give back the image to "WebForm1.aspx"