473,549 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP to display image rather than text path ??

Hi,

I have asp pages running from a MySQL database.
I have placed a path in the required field (although not quite sure on
the correct format).

My asp page is just displaying the text path instead of the image.
I'm using response.write.

The Folder is called : images
This folder is within : wwwroot\works\i mages\image1.jp g

How should I display this in the MySQL field ?
I have the field as type: VarChar

How do I display image1.jpg on my asp page ?

Appreciate your help

Thanks

David Gordon

Aug 16 '05 #1
2 2262
Well, the image path *on the web* is probably /works/images/image1.jpg, so
that is what you should enter.

Now, I don't know exactly how you're retrieving this value from MySQL into
your ASP page, but once you have the value, you just say:

<img src="<%=imgPath %>">

Hopefully you see why this will not work if the imgPath =
wwwroot\works\i mages\image1.jp g

<da***@scene-double.co.uk> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hi,

I have asp pages running from a MySQL database.
I have placed a path in the required field (although not quite sure on
the correct format).

My asp page is just displaying the text path instead of the image.
I'm using response.write.

The Folder is called : images
This folder is within : wwwroot\works\i mages\image1.jp g

How should I display this in the MySQL field ?
I have the field as type: VarChar

How do I display image1.jpg on my asp page ?

Appreciate your help

Thanks

David Gordon

Aug 16 '05 #2
da***@scene-double.co.uk wrote:
Hi,

I have asp pages running from a MySQL database.
I have placed a path in the required field (although not quite sure on
the correct format).
It should be a url to the file.

My asp page is just displaying the text path instead of the image.
I'm using response.write.

The Folder is called : images
This folder is within : wwwroot\works\i mages\image1.jp g

How should I display this in the MySQL field ?
I have the field as type: VarChar

How do I display image1.jpg on my asp page ?

Appreciate your help

Thanks

David Gordon


<%
dim img
img=<content of recordset field>
%>
<html>
<body>
<IMG src="<%=img%>">
</body>
</html>
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Aug 16 '05 #3

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

Similar topics

3
11744
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
3
10255
by: Mark | last post by:
Hello all - I'm at wits end with trying to figure out why I'm having this problem since I followed the research, that I've dug up, to a "T". I'm trying to display a JPEG image from a path directory within a Crystal Report. I created a typed dataset that is not bound to the database called dsLogo and created one field within it that has a...
15
5311
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run...
5
5020
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page that calls the web service to render a vertical strip of images. After doing some research I am unable to find some vb.net code that can assist...
3
5227
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from database and display it in a Image web control dynamically(at runtime). The process after being displayed in the web control, user click insert/add...
2
16622
by: smorrison64 | last post by:
I have a form that is coded to open a File Dialog boc to pick a picture to display on that particular item on a subform. My form is not based on query, but rather two separate tables (one primary, one sub). That code is working properly. How do I get that to translate to my report? I use VBA code because I use formats other than BMP for the...
1
2977
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for image upload in database: -----------Upload.jsp---------------- <html> <head> <title>Account Details </title>
2
8318
by: Tim Streater | last post by:
The following test page is intended to allow the user to choose an image file, and then display it. It works as expected in Safari 3.1.1, FF 2.0.0.14 (Mac), and IE7 (XP). But, it fails in FF 2.0.0.14 (Win-XP) - the image doesn't appear. The error console shows no errors and Page Info, under the media tab, shows no loaded image (in contrast...
0
10726
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not...
0
7471
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...
0
7740
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7985
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7503
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...
0
7830
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...
0
6071
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...
0
3517
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1962
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
0
784
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.