EMBEDED ASPX page

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to embed an aspx page within another aspx page. Is it possible
to persist the data to the embedded page?
 
Any suggestion are welcome. What I am trying to do is to display an SVG
graph in an aspx page. The graph changes depending on the user. I need to
query the DB to get the data.

My main page has code like this:
<embed src="svgPage.ASPX" type="image/svg+xml"></embed>
 
When the user starts a session, I would retrieve the image data from the
database as a bitmap and write it to a memory stream. I would set the
buffer of the memory stream as a session variable, say, Session("MyImage").

Next I would create an aspx page, say, source.aspx and put this code in the
page load event

Response.BufferOutput = True
Response.ContentType = "Image/JPEG"
Response.BinaryWrite(Session("MyImage"))
Response.Flush()
Response.End()

Then just use source.aspx as the imageurl for and image control on whatever
page you want to display the image.

Or you could put eh source.aspx in an IFrame in the HTML code.
 

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

Back
Top