what other way is there

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

Guest

hey all,

i'm using the following line of c# code:

bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);

and i use this by saying

image.imageurl = picture.aspx?id= ...

my question is: is there anyway to directly assign the bitmap to the
imageUrl property without needing the aspx page to host it?

thanks,
rodchar
 
Hi,

I don;t understand what is your problem, the first line you are saving a
bitmap
and in the second one you are setting the image source of a image control in
a web page.

What one has to do with the other?
 
rodchar,

When you save a bitmap, you are saving it to the local file system.
That is, the file system on the server. When you set the imageurl property,
you need to set it to a URL that will deliver that file. There is no way to
directly assign the bitmap to the ImageUrl property. What you are doing
(generating the image in a separate referenced page) is what is required,
due to the nature of HTML (with the ability to hotlink).

Is there a block that you are hitting because of this?
 
i guess i was just wondering how the 3rd party tools did it because all you
have to do in those is drag a control out from the toolbox and bind to it.

Nicholas Paldino said:
rodchar,

When you save a bitmap, you are saving it to the local file system.
That is, the file system on the server. When you set the imageurl property,
you need to set it to a URL that will deliver that file. There is no way to
directly assign the bitmap to the ImageUrl property. What you are doing
(generating the image in a separate referenced page) is what is required,
due to the nature of HTML (with the ability to hotlink).

Is there a block that you are hitting because of this?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

rodchar said:
hey all,

i'm using the following line of c# code:

bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);

and i use this by saying

image.imageurl = picture.aspx?id= ...

my question is: is there anyway to directly assign the bitmap to the
imageUrl property without needing the aspx page to host it?

thanks,
rodchar
 
Sorry about that last reply it probably didn't make any sense. The 3rd part
control i was referring to was the charting controls (pie, bar graphs). This
is just an FYI not a question. Thanks for your help.

rodchar said:
i guess i was just wondering how the 3rd party tools did it because all you
have to do in those is drag a control out from the toolbox and bind to it.

Nicholas Paldino said:
rodchar,

When you save a bitmap, you are saving it to the local file system.
That is, the file system on the server. When you set the imageurl property,
you need to set it to a URL that will deliver that file. There is no way to
directly assign the bitmap to the ImageUrl property. What you are doing
(generating the image in a separate referenced page) is what is required,
due to the nature of HTML (with the ability to hotlink).

Is there a block that you are hitting because of this?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

rodchar said:
hey all,

i'm using the following line of c# code:

bitmap.Save(Response.OutputStream, ImageFormat.Jpeg);

and i use this by saying

image.imageurl = picture.aspx?id= ...

my question is: is there anyway to directly assign the bitmap to the
imageUrl property without needing the aspx page to host it?

thanks,
rodchar
 

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