Pass Variables to page that is Page ContentType="image/Jpeg"

S

Sam

I'm wondering if I can pass variables to "TestForm.aspx" with the way
I'm using it. It's acting as a jpeg image and looks like:

<%@ Page ContentType="image/Jpeg" %>
<%@ Import namespace="System.Drawing" %>
<%@ Import namespace="System.Drawing.Imaging" %>
<Script Runat="Server">
Sub Page_Load
Dim objBitmap As Bitmap
Dim objGraphics As Graphics
Dim x As Integer
Dim y As Integer

x = 10
y = 10

'Create Bitmap
objBitmap = new bitmap("C:\MyBitmap.bmp")


'Draw point on bitmap
objGraphics = Graphics.FromImage(objBitmap)
objGraphics.FillEllipse(Brushes.Black, x, y, 7, 7)

'Save Bitmap to this page's Out stream
objBitmap.Save(Response.OutputStream, ImageFormat.Jpeg)
End Sub
</Script>

My Main form MainForm.aspx has an image control and a button when the
button is clicked I set the image url to the TestForm:

Private Sub Button1_Click(ByVal sender As Object, _
ByVal e As EventArgs) Handles Button1.Click
Image1.ImageUrl = "TestForm.aspx"
End Sub

I'd like to pass the X and Y to the TestForm. Is there a way to do
this?

Thanks for any help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top