By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 1,922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

Blob

P: n/a
hi
i have a blob field in my database and am able to display it on my asp.net
page
i would like to know how can i position the Blob on the page or can i use an
image object?
byte[] Picture;
Picture = (byte[])dr["logo"];
Response.Buffer=true;
Response.ContentType = "Image/JPEG"; //after i set this i cant even get a
response.write to work on mypage.
Response.BinaryWrite(Picture);
is there any way i can put this picture in an imagebutton?
thanx
Nov 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You can't mix content types. Once you've set the content type of your page to image/jpeg, you can't use Response.Write and expect normal HTML content.

Instead - server the image from an external linked ASP.NET page and link it in an <img> tag.

E.g.

<img src="mydynamicimage.aspx?id=4" />

Hope that helps.

Cheers,
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 17 '05 #2

P: n/a
thanx works well...
i just wanted to know what are the advantages of storing the images in a
blob as opposed to storing the filepath in the table and retrieving the
image from there.
thanx for your help
Nov 17 '05 #3

P: n/a
There are only DISadvantages to storing images in a BLOB field at this time,
due to the processing overhead involved in storing and fetching binary data
from a database rather than the file system. Perhaps with Longhorn, this
will change.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"ichor" <ch***@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
thanx works well...
i just wanted to know what are the advantages of storing the images in a
blob as opposed to storing the filepath in the table and retrieving the
image from there.
thanx for your help

Nov 17 '05 #4

P: n/a
When is it longhorn scheduled to be released?
thanx

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
There are only DISadvantages to storing images in a BLOB field at this time, due to the processing overhead involved in storing and fetching binary data from a database rather than the file system. Perhaps with Longhorn, this
will change.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"ichor" <ch***@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
thanx works well...
i just wanted to know what are the advantages of storing the images in a
blob as opposed to storing the filepath in the table and retrieving the
image from there.
thanx for your help


Nov 17 '05 #5

P: n/a
I wouldn't hold my breath. Windows Server 2003 just came out!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"ichor" <ch***@hotmail.com> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
When is it longhorn scheduled to be released?
thanx

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
There are only DISadvantages to storing images in a BLOB field at this

time,
due to the processing overhead involved in storing and fetching binary

data
from a database rather than the file system. Perhaps with Longhorn, this
will change.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"ichor" <ch***@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl...
thanx works well...
i just wanted to know what are the advantages of storing the images in a blob as opposed to storing the filepath in the table and retrieving the image from there.
thanx for your help



Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.