you are confusing concepts. an ImageButton, is not an image, its a html
control, with a property that refers to URL that returns an image. thus an
image button really has no image, it renders the following html
<input type="image" src="myimage.gif">
in your case you probably want the src to refer to a page that returns an
image
<input type="image" src="myImageProducer.aspx">
you can google for samples of aspx pages that return an image.
-- bruce (sqlwork.com)
"Varangian" <of****@gmail.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
No I can't. I specifically need that System.Drawing.Image object and
then apply it to an ImageButton
I'm trying to use these lines of code currently! What I am doing wrong,
I'm getting error "Object must implement IConvertible"... what is meant
by that error?
const string url = @"c:\Inetpub\wwwroot\pagerror.gif";
object image = System.Drawing.Image.FromFile(url);
object test = (ImageButton)System.Convert.ChangeType(image,
typeof(ImageButton));