Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying a dynamic image in an Image Button

Status
Not open for further replies.

joolsb

Programmer
Jul 25, 2003
2
GB
I am wanting to create an image, then send this to an aspx file and display the image in an imageButton. However, I can only see how to display an image which already exists on file (using imageURL= ) and can't seem to work out how to display an image created in a c# file.

Any suggestions?
 
how about saving your image to file first? i know it's a bit heavy, but hey, so's butter.
 
yeh, I thought of that but then I'm going to get loads of unwanted files which i presume will have to be manually deleted?

Is this the only way to get an image in an image button?
 
you could listen for the paint event and add it in there. if you have it as an Image object then you can use Graphics.DrawImage. if you dont have it as an image (perhaps a Bitmap) then you'd better convert it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top