Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 09-23-2004, 09:21 AM ASP & Images
frik's Avatar
Average Talker

Posts: 26
Location: SOuth Africa
Trades: 0
When I run the following code in my ASP page
Response.Write "<img src="IMG_1771AA.jpg">"
I get the following error message Expected end of statement

What am I doing wrong ?

Thanks

Frik
frik is offline
Reply With Quote
View Public Profile Visit frik's homepage!
 
 
Register now for full access!
Old 09-23-2004, 10:51 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
The quotes you are using for the src attribute are making the Response.Write method think that is the end of the command -- then it doesn't know what to do with IMG_1771AA.jpg and the rest of your line. Try this.

Code:
Response.Write "<img src='IMG_1771AA.jpg'>"
or this (I believe) is another way to escape double quotes in VBScript.

Code:
Response.Write "<img src=""IMG_1771AA.jpg"">"
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 10-01-2004, 07:48 AM
pencer's Avatar
Extreme Talker

Posts: 179
Location: Nottingham UK
Trades: 0
I personally like to use chr(34) to replace double quotes, not sure why. it just 'feels' right!

So you code would be:

Response.Write ("<img src=" & chr(34) & "IMG_1771AA.jpg" & chr(34) & ">")
pencer is offline
Reply With Quote
View Public Profile Visit pencer's homepage!
 
Reply     « Reply to ASP & Images
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13200 seconds with 12 queries