P
Philip Wilson
Hello,
I am trying to dynamically generate an imagemap in vb.net. I have managed to generate the image easily enough by creating a .aspx page that returns the generated image and then using the <img src="dynamicimage.aspx" imagemap=...> to put that image onto the page.
I am using the following method in the dynamicimage.aspx to return the image:
Response.ContentType = "image/gif"
AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
Now I need to generate the imagemap HTML code. I thought the logical place to generate this code is in the dynamicimage.aspx page since I will already be working with the coordinates to create the image, so I can just create the HTML code as I create the image.
But then, what is the best way to get that HTML code back into the main aspx page that contains the <img src="dynamicimage.aspx">.
I would like to do it all on the one page by assigning the Bitmap object to an image on the page and then just outputting the imagemap code to the same page, however I have not seen any way of inserting the generated image into the existing page along with HTML code. If I use an ASP:Image I don't seem to have any way of specifying an imagemap and I can't see a way of linking my Bitmap object to a <IMG> without saving it out as a file first.
I am fairly new to this, any ideas would be greatly appreciated.
Cheers,
Phil
I am trying to dynamically generate an imagemap in vb.net. I have managed to generate the image easily enough by creating a .aspx page that returns the generated image and then using the <img src="dynamicimage.aspx" imagemap=...> to put that image onto the page.
I am using the following method in the dynamicimage.aspx to return the image:
Response.ContentType = "image/gif"
AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
Now I need to generate the imagemap HTML code. I thought the logical place to generate this code is in the dynamicimage.aspx page since I will already be working with the coordinates to create the image, so I can just create the HTML code as I create the image.
But then, what is the best way to get that HTML code back into the main aspx page that contains the <img src="dynamicimage.aspx">.
I would like to do it all on the one page by assigning the Bitmap object to an image on the page and then just outputting the imagemap code to the same page, however I have not seen any way of inserting the generated image into the existing page along with HTML code. If I use an ASP:Image I don't seem to have any way of specifying an imagemap and I can't see a way of linking my Bitmap object to a <IMG> without saving it out as a file first.
I am fairly new to this, any ideas would be greatly appreciated.
Cheers,
Phil