resize image

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

Guest

I'm pulling an image from the db in binary format, i want to make the image
the background of the web page - sort of.
I want to display the image on the background of the page but centered on
the page and not be the entire background. I want to keep the bgcolor but
have the image centered and only show it once on the page and not multiple
times.

is this possible or no?
 
Ken's method should work except that it sounds like you want to generate the
image dynamically from a database. To do so, you will need to create a
separate ASPX file (ie. MyDynamicImage.aspx) that outputs the image binary
and specifies the appropriate Response.ContentType for the image and (maybe)
add the "content-disposition" header. Then, using Ken's method, you can
specify the source of the image via
url(MyDynamicImage.aspx?ImageID=[identifier])

Ken Cox said:
Hi Mike,

You need to use a Style. Try this?

<body style="background:ivory url(http://www.gc.ca/images/rollingflag.jpg)
no-repeat;background-position:center center ; ">

Ken
MVP [ASP.NET]


Mike said:
I'm pulling an image from the db in binary format, i want to make the image
the background of the web page - sort of.
I want to display the image on the background of the page but centered on
the page and not be the entire background. I want to keep the bgcolor but
have the image centered and only show it once on the page and not multiple
times.

is this possible or no?
 
Ken's method should work except that it sounds like you want to generate the
image dynamically from a database. To do so, you will need to create a
separate ASPX file (ie. MyDynamicImage.aspx) that outputs the image binary
and specifies the appropriate Response.ContentType for the image and (maybe)
add the "content-disposition" header. Then, using Ken's method, you can
specify the source of the image via
url(MyDynamicImage.aspx?ImageID=[identifier])

Ken Cox said:
Hi Mike,

You need to use a Style. Try this?

<body style="background:ivory url(http://www.gc.ca/images/rollingflag.jpg)
no-repeat;background-position:center center ; ">

Ken
MVP [ASP.NET]


Mike said:
I'm pulling an image from the db in binary format, i want to make the image
the background of the web page - sort of.
I want to display the image on the background of the page but centered on
the page and not be the entire background. I want to keep the bgcolor but
have the image centered and only show it once on the page and not multiple
times.

is this possible or no?
 
Back
Top