473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Writing image data to web page without additional ASPX file

About 4 months ago I came across this one web page that talked about
streaming raw image data (from a database, for example) directly to a
web page without requiring a secondary ASPX page to output the data as
an image.

I cannot remember if it talked about having the raw data inline with the
HTML page, or having it bound to a server control. Does anyone know the
article that I am talking about?

TIA
...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
“Anyone who believes in Intelligent Design (“creationism”) is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms.” - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************
Feb 13 '06 #1
6 1772
Neo,
Here is one implementation that I did some time ago, for starters:

http://www.eggheadcafe.com/articles/20050911.asp

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Neo Geshel" wrote:
About 4 months ago I came across this one web page that talked about
streaming raw image data (from a database, for example) directly to a
web page without requiring a secondary ASPX page to output the data as
an image.

I cannot remember if it talked about having the raw data inline with the
HTML page, or having it bound to a server control. Does anyone know the
article that I am talking about?

TIA
...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
“Anyone who believes in Intelligent Design (“creationism”) is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms.” - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************

Feb 13 '06 #2
html 4.0 compliant browsers (firefox, safari,opera, etc), but not IE
obviously, support inline encoding of an image.

<img src="data:image/gif;base64,<image encoded in base64>">

-- bruce (sqlwork.com)

"Neo Geshel" <go****@geshel.org> wrote in message
news:565If.610929$ki.240083@pd7tw2no...
About 4 months ago I came across this one web page that talked about
streaming raw image data (from a database, for example) directly to a
web page without requiring a secondary ASPX page to output the data as
an image.

I cannot remember if it talked about having the raw data inline with the
HTML page, or having it bound to a server control. Does anyone know the
article that I am talking about?

TIA
....Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
"Anyone who believes in Intelligent Design ("creationism") is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms." - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that "A nymphomaniac is a woman [who is] as
obsessed with sex as the average man." Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************
Feb 13 '06 #3
Bruce Barker wrote:
html 4.0 compliant browsers (firefox, safari,opera, etc), but not IE
obviously, support inline encoding of an image.

<img src="data:image/gif;base64,<image encoded in base64>">

-- bruce (sqlwork.com)


Okay, second silly question: how do I make the <input type="file"
runat="server" /> HTML control maintain viewstate?

What I am trying to do is create a very simple news post form with a
preview. A title, date, and main body (comment) is entered, with an
optional image. When I go to preview a post, it is a simple matter to
unhide a placeholder that contains literals that can be filled, so a
"preview" can be constructed. Since this is an admin interface, I can
easily restrict the browser type to Mozilla/Opera, and make use of your
method above by calling the raw content of the file being uploaded.
However, the original file upload input field becomes blank again,
preventing a file upload after a preview.

What I would like to do is be able to either maintain viewstate for the
file input field, or get the complete drive path of the file on the
client's computer (C:\filesystem\image.jpg) and use that as the image
URL as well as repopulating the file input field with it. Since this is
an admin site, and since this is a preview of the post, using the
client's drive path for the image would work beautifully prior to the
image actually being uploaded.

Any suggestions?
...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
“Anyone who believes in Intelligent Design (“creationism”) is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms.” - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************
Feb 13 '06 #4
Peter Bromberg [C# MVP] wrote:
Neo,
Here is one implementation that I did some time ago, for starters:

http://www.eggheadcafe.com/articles/20050911.asp

Peter



An excellent choice for the front-end site, but a little too heavy for
the quick-and-dirty admin section that I’m now working on...

Thanks, tho! I’ll take a look over it once I get the admin section done,
as displaying images is a bit of a kludge on the main site.

...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
“Anyone who believes in Intelligent Design (“creationism”) is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms.” - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************
Feb 14 '06 #5
The filename in the File Upload control is not retained between postbacks.
This is a security feature that cannot be altered.
It may be possible to get around this with client side code, but I'm not
sure I'd recommend that since you'd be overriding carefully thought out
security precautions.

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net
--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net

"Neo Geshel" wrote:
Bruce Barker wrote:
html 4.0 compliant browsers (firefox, safari,opera, etc), but not IE
obviously, support inline encoding of an image.

<img src="data:image/gif;base64,<image encoded in base64>">

-- bruce (sqlwork.com)


Okay, second silly question: how do I make the <input type="file"
runat="server" /> HTML control maintain viewstate?

What I am trying to do is create a very simple news post form with a
preview. A title, date, and main body (comment) is entered, with an
optional image. When I go to preview a post, it is a simple matter to
unhide a placeholder that contains literals that can be filled, so a
"preview" can be constructed. Since this is an admin interface, I can
easily restrict the browser type to Mozilla/Opera, and make use of your
method above by calling the raw content of the file being uploaded.
However, the original file upload input field becomes blank again,
preventing a file upload after a preview.

What I would like to do is be able to either maintain viewstate for the
file input field, or get the complete drive path of the file on the
client's computer (C:\filesystem\image.jpg) and use that as the image
URL as well as repopulating the file input field with it. Since this is
an admin site, and since this is a preview of the post, using the
client's drive path for the image would work beautifully prior to the
image actually being uploaded.

Any suggestions?
...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
“Anyone who believes in Intelligent Design (“creationism”) is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms.” - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************

Feb 14 '06 #6
Steve C. Orr wrote:
The filename in the File Upload control is not retained between postbacks.
This is a security feature that cannot be altered.
It may be possible to get around this with client side code, but I'm not
sure I'd recommend that since you'd be overriding carefully thought out
security precautions.


Okay, since all I really need is the raw image data (formatted as
base64), perhaps I can store that data between previews, even as it’s
also being used to show the image itself.

Think this would work?

...Geshel
--
************************************************** *********************
* My reply-to is an automatically monitored spam honeypot. Do not use *
* it unless you want to be blacklisted by SpamCop. Please reply to my *
* first name at my last name dot org. *
************************************************** *********************
“Anyone who believes in Intelligent Design (“creationism”) is just as
ignorant and ill-educated as someone who believes that the world is
flat, that the Sun circles the Earth or that there really is a tooth
fairy. Darwinism has an overwhelming foundation of evidence that can be
tested and reproduced. Intelligent Design, on the other hand, has no
evidence at all; not one single shred of testable proof. As such,
Intelligent Design is Religious Mythology, and has no right whatsoever
to be in our Science classrooms.” - 99.99+% of Scientists
************************************************** *********************
Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
obsessed with sex as the average man.” Unfortunately, since true
nymphomaniacs are so rare, this means that it takes an extraordinary
woman to keep up with an ordinary man.
************************************************** *********************
Feb 14 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: gb | last post by:
I'm able to get a bitmap out of my database and write it to an aspx page and this works easily. However, this cannot be saved as a jpg file as it is simply an image written to a web page. Does...
2
by: Christopher Ambler | last post by:
I'm wondering if there's a solution here - I have an ASPX page with a sole purpose of scaling an image. The ASPX page contains a single line with the codebehind tag, and the .cs file contains...
3
by: Simon Harris | last post by:
Hi All, I have a data grid which displays country names. I now wish to display the country flag images above the names. Can someone please advise how I display an image in a datagrid? I have a...
11
by: tma | last post by:
I have the following HTML in use on my web page. I need it to show a graphic image on the page but do not know what to use in the codebehind to make the graphic appear. If I load the source url in...
13
by: Neo Geshel | last post by:
I have examined about 80+ different upload scripts on the 'net, both in VB and C#, and none seem to do what I need them to do. Perhaps someone here can point me somewhere that Google hasn't...
9
by: Rajesh | last post by:
Hi all, Im gonna display a list of images in an aspx page from sql server Db.Each image has a link.When someone clicks the image i want the width and size of the image to be displayed at the...
10
by: Mirek Endys | last post by:
Is there a posibility to make web control, that is drawing an image to webpage without needing to save it into a file? (for example, i will save picture into db server and I want to show it...
6
by: Jeff | last post by:
hi asp.net 2.0 I have a image (.jpeg) stored in sql server 2005 and now I want to display it on a webpage. So I created a webpage (Image.aspx) which just writes the buffer data to the...
3
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.