The problem you have is that your working in the server side's memory... and
so the image you're creating and using is, the server's buffer. When the
request from the client to the server is made to pass it a picture, it needs
to be a file that's requested, or the server won't know how to send it, and
the client won't know how to receive it and show it.
The only way you can do this is to first stream out the buffer, (i.e, save
the bitmap to disk), then take that URL you've just saved the file too and
pass that to the image button's URL.
I'd suggest using something like in the ASP page...
<A HREF="somefolder/somefile"><IMG BORDER=no ID=myImage
SRC="images/myTempPick.jpg"></A>
then when you've gotten the bitmap and saved it, something like... (aspx.vb
file)
dim ClientScript as String = ""
ClientScript += "<SCRIPT language=javascript>" & vbNewLine
ClientScript += " document.all.myImage.src = " & stringImageURL &
vbNewLine ' where stringImageURL is a string containing your image
location you've saved out
ClientScript += "</SCRIPT>
RegisterStartupScript( "ImageChange", ClientScript )
This code then writes the client side script to change your image URL from
the TempPick to whatever pic you now want. Note that I used HTML's standard
<IMG> rather than the <ASP:...>, I haven't played much with the ASP.net
controls in this way so am not sure what they'll do, try it!
hope that helps, and works!
Dan.