Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to insert image into asp code.

Status
Not open for further replies.

nsanto17

IS-IT--Management
Mar 14, 2005
616
US
I am trying to insert an image if a db field is = "1"

Code:
<%
If (rs_list_brokers.Fields.Item("CT_Ck").Value) = 0 then 
	var_CT_Ck = "-"
	else 
	var_CT_Ck = <img src="../../images/check_mark.bmp">
		
End If 
%>

I can't find what i am missing????

Thanks for any help.

Nick
 
In the future, try to post an error message, and which line was generating the error... For starters, try:

var_CT_Ck = [highlight]"[/highlight]<img src=[highlight]"[/highlight]"../../images/check_mark.bmp[highlight]"[/highlight]">[highlight]"[/highlight]
 
OR
insert quotemarks where required

Code:
var_CT_Ck = "<img src=" & chr(34) & "../../images/check_mark.bmp" & chr(34) &">"

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
 
or you can try this:
Code:
var_CT_Ck = "<img src=" & "'../../images/check_mark.bmp'>"
single qoutes work ok in html too as long as they're paired.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top