473,785 Members | 2,482 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

images and text with response

Hi

I got a sql's table with images and i need to show the image on a popup with
some text, my problem is that the text did not show up only the image

'------------Show the image ( works fine)
Response.Buffer = True
Response.Conten tType = oImg.Formato.Tr im
Response.Binary Write(oImg.Imag en)

'-------show the image name ( does not work)

Response.Conten tType = sContent
Response.Write( "<strong>Co d.: </strong>" & sCodPer & "<br>")
Response.Write( "<strong>Na me : </strong>" & sNombreCompleto )

Where is my mistake???
Thanks in Advance
bye

Jan 12 '07 #1
4 1286
You can't mix them like this. If you want to write an image to the output
stream then you can only have an image. You can't mix it with other content.
There is a way around this though. The way is to have a page that has an
image tag. This image tag points to another page whose only job is to write
the image to the output stream. For example, the url for the image may look
like generateimage.a spx?id=1. You can pass id parameters to it whoever you
need in order to tell the page to which image to generate. Then the image is
generated into the output stream and seen by the browser as an image file,
thus tying the image element to a valid image from the server. you can put
anything else you want on that page in addition to the image tag, such as a
literal or label to contain the content or descriptive information about the
image.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"SergioT" <st***********@ gmail.omwrote in message
news:Od******** ********@TK2MSF TNGP03.phx.gbl. ..
Hi

I got a sql's table with images and i need to show the image on a popup
with some text, my problem is that the text did not show up only the image

'------------Show the image ( works fine)
Response.Buffer = True
Response.Conten tType = oImg.Formato.Tr im
Response.Binary Write(oImg.Imag en)

'-------show the image name ( does not work)

Response.Conten tType = sContent
Response.Write( "<strong>Co d.: </strong>" & sCodPer & "<br>")
Response.Write( "<strong>Na me : </strong>" & sNombreCompleto )

Where is my mistake???
Thanks in Advance
bye

Jan 12 '07 #2
Hi Mark

Thanks for your tip!!! I gonna try

If I understood :

I have to put something like this: <IMG alt=""
src="myImagePag e.aspx?show=1"o n my page and all the process to show the
image I mus do it on "myImagePage.as px" Is that correct?

bye and thanks again

"Mark Fitzpatrick" <ma******@fitzm e.comescribió en el mensaje
news:OM******** ******@TK2MSFTN GP03.phx.gbl...
You can't mix them like this. If you want to write an image to the output
stream then you can only have an image. You can't mix it with other
content. There is a way around this though. The way is to have a page that
has an image tag. This image tag points to another page whose only job is
to write the image to the output stream. For example, the url for the
image may look like generateimage.a spx?id=1. You can pass id parameters to
it whoever you need in order to tell the page to which image to generate.
Then the image is generated into the output stream and seen by the browser
as an image file, thus tying the image element to a valid image from the
server. you can put anything else you want on that page in addition to the
image tag, such as a literal or label to contain the content or
descriptive information about the image.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"SergioT" <st***********@ gmail.omwrote in message
news:Od******** ********@TK2MSF TNGP03.phx.gbl. ..
>Hi

I got a sql's table with images and i need to show the image on a popup
with some text, my problem is that the text did not show up only the
image

'------------Show the image ( works fine)
Response.Buffe r = True
Response.Conte ntType = oImg.Formato.Tr im
Response.Binar yWrite(oImg.Ima gen)

'-------show the image name ( does not work)

Response.Conte ntType = sContent
Response.Write ("<strong>Co d.: </strong>" & sCodPer & "<br>")
Response.Write ("<strong>Na me : </strong>" & sNombreCompleto )

Where is my mistake???
Thanks in Advance
bye


Jan 12 '07 #3
That's exactly correct. you just need the image tag to call have the script
to generate the image as it's source. Unfortunately, in the case of wanting
to have an image and a description dynamically generated, it results with
two database calls (one from the image page to get the image and the other
to get the description that goes with the image).

--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"SergioT" <st***********@ gmail.omwrote in message
news:%2******** *******@TK2MSFT NGP03.phx.gbl.. .
Hi Mark

Thanks for your tip!!! I gonna try

If I understood :

I have to put something like this: <IMG alt=""
src="myImagePag e.aspx?show=1"o n my page and all the process to show the
image I mus do it on "myImagePage.as px" Is that correct?

bye and thanks again

"Mark Fitzpatrick" <ma******@fitzm e.comescribió en el mensaje
news:OM******** ******@TK2MSFTN GP03.phx.gbl...
>You can't mix them like this. If you want to write an image to the output
stream then you can only have an image. You can't mix it with other
content. There is a way around this though. The way is to have a page
that has an image tag. This image tag points to another page whose only
job is to write the image to the output stream. For example, the url for
the image may look like generateimage.a spx?id=1. You can pass id
parameters to it whoever you need in order to tell the page to which
image to generate. Then the image is generated into the output stream and
seen by the browser as an image file, thus tying the image element to a
valid image from the server. you can put anything else you want on that
page in addition to the image tag, such as a literal or label to contain
the content or descriptive information about the image.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"SergioT" <st***********@ gmail.omwrote in message
news:Od******* *********@TK2MS FTNGP03.phx.gbl ...
>>Hi

I got a sql's table with images and i need to show the image on a popup
with some text, my problem is that the text did not show up only the
image

'------------Show the image ( works fine)
Response.Buff er = True
Response.Cont entType = oImg.Formato.Tr im
Response.Bina ryWrite(oImg.Im agen)

'-------show the image name ( does not work)

Response.Cont entType = sContent
Response.Writ e("<strong>Cod. : </strong>" & sCodPer & "<br>")
Response.Writ e("<strong>Na me : </strong>" & sNombreCompleto )

Where is my mistake???
Thanks in Advance
bye



Jan 12 '07 #4
Hi Mark

THANKS!!! it works really nice

Bye
"Mark Fitzpatrick" <ma******@fitzm e.comescribió en el mensaje
news:eJ******** ******@TK2MSFTN GP06.phx.gbl...
That's exactly correct. you just need the image tag to call have the
script to generate the image as it's source. Unfortunately, in the case of
wanting to have an image and a description dynamically generated, it
results with two database calls (one from the image page to get the image
and the other to get the description that goes with the image).

--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"SergioT" <st***********@ gmail.omwrote in message
news:%2******** *******@TK2MSFT NGP03.phx.gbl.. .
>Hi Mark

Thanks for your tip!!! I gonna try

If I understood :

I have to put something like this: <IMG alt=""
src="myImagePa ge.aspx?show=1" on my page and all the process to show the
image I mus do it on "myImagePage.as px" Is that correct?

bye and thanks again

"Mark Fitzpatrick" <ma******@fitzm e.comescribió en el mensaje
news:OM******* *******@TK2MSFT NGP03.phx.gbl.. .
>>You can't mix them like this. If you want to write an image to the
output stream then you can only have an image. You can't mix it with
other content. There is a way around this though. The way is to have a
page that has an image tag. This image tag points to another page whose
only job is to write the image to the output stream. For example, the
url for the image may look like generateimage.a spx?id=1. You can pass id
parameters to it whoever you need in order to tell the page to which
image to generate. Then the image is generated into the output stream
and seen by the browser as an image file, thus tying the image element
to a valid image from the server. you can put anything else you want on
that page in addition to the image tag, such as a literal or label to
contain the content or descriptive information about the image.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"SergioT" <st***********@ gmail.omwrote in message
news:Od****** **********@TK2M SFTNGP03.phx.gb l...
Hi

I got a sql's table with images and i need to show the image on a popup
with some text, my problem is that the text did not show up only the
image

'------------Show the image ( works fine)
Response.Buf fer = True
Response.Con tentType = oImg.Formato.Tr im
Response.Bin aryWrite(oImg.I magen)

'-------show the image name ( does not work)

Response.Con tentType = sContent
Response.Wri te("<strong>Cod .: </strong>" & sCodPer & "<br>")
Response.Wri te("<strong>Nam e : </strong>" & sNombreCompleto )

Where is my mistake???
Thanks in Advance
bye





Jan 12 '07 #5

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

Similar topics

7
2343
by: Vinay | last post by:
Hi All: I have a small application that stores images either in the database or as files (depending on the user preference). I'm in the process of providing a web interface to this application. 1. If the images are stored in the DB then, every an image is requested, it will need to be pulled out and a temp file created and then displayed? What is the best way to do this?
2
2404
by: James Lang | last post by:
Hi I am trying to display in an aspx page an image from the employees table in the sql server 2000 Northhwind database "Select photo from employees where employeeid = 1"
3
3488
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. -Regards Arun
7
1664
by: TomislaW | last post by:
I need to include some pictures from other web application (written in Java), Source of pictures are: <http://www.xy.com/bla/id/imageNumber>. I don't know how many pictures there are So I need to read header from WebRequest to see if it is default image or not This is my code: int i = 0; bool defaultImage = true; do { i++;
10
2368
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images. That is, images inline with the actual content of the blog itself. Is there an example that I can be pointed to, where I can examine some code and figure out how to do this? Frankly I haven't got a clue, aside from breaking the content up into...
3
2366
by: CLEAR-RCIC | last post by:
I have several images i want to display in an ASP.Net application. The images are being passed to me in binary format from another application. Is there a good way to write them directly to an HMTL page without having to save them to the server and create a URL to the virtual directory? FYI: I currently am doing this with just single images. I do a Response.BinaryWrite(byte) to display the one image. The advantage is that I never...
10
1980
by: mrajanikrishna | last post by:
Hello friends, I have developed an application using ASP.NET and SQL Server. Ours is a garment factory. I need to design another module in my application. I want to generate images on fly based on users selection(body, sleeve etc). Until here no problem. Coz we have only 2 types of bodies and 3 types of sleeves and 3 types of necks. I can design static images and save in
9
3840
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
0
1476
by: etnaelk | last post by:
Hi all, I have a real bugger of a problem that I just haven't been able to figure out. I am working on writing my own proxy server in C# using TcpListener, TcpClient, HttpWebRequest/Response and NetworkStream. I have everything working pretty well except images won't load to their location. ------------------------------------------------------------------------------------------------------------------...
1
3349
by: ttamilvanan81 | last post by:
Hai everyone, I need to provide the slideshow for the images. I have upload the images into database. Then i will retrive all the images from the database and provide the slideshow for those images. I have try with the following jsp code. <%@ page language="java" %> <%@ page import="java.sql.*"%> <%@ page import="java.sql.Connection.*"%> <%@ page import="java.awt.image.*"%>
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10090
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.