|
 |
asp_databases thread: How to include a URL in ASP/HTML?
Message #1 by Edward Cox <ecox@b...> on Mon, 21 Jan 2002 17:59:52 +1100
|
|
Hi,
First time poster here. Can some kind person please tell me what I am doing
wrong here.
Trying to simple include a URL in a HTML page via ASP from a MySQL
database.. But get:
Vbscript Runtime error 'ASP 0185 : 13'
Type mismatch
/individual.asp,line 182
** Here's the HTML code snippet **
<%
varContactID = objRecordSet("id")
varCompany = "" & objRecordSet("g_company")
varLastName = "" & objRecordSet("g_lastname")
varFirstName = "" & objRecordSet("g_firstname")
varPosition = "" & objRecordSet("g_position")
varCountry = "" & objRecordSet("g_country")
varQuote = "" & objRecordSet("g_quote")
varBio = "" & objRecordSet("g_biography")
varPhotoPath = "images/gallery/" & objRecordSet("g_photopath")
response.write(varPhotoPath)
%>
</font></p><p class=MsoNormal style="text-align:justify"><font
face="Verdana,Helvetica" size="2"><b>CEO GALLERY FOR <%=UCase(varFirstName)
& " " & UCase(varLastName)%></b></font></p>
<img src=<%varPhotoPath%> width="80" height="80" border="0">
<p class=MsoNormal style="text-align:justify">
<font face="Verdana,Arial" size="2"><%=varCompany%>,<br>
<%=varPosition%>, <%=varCompany%><br>
<%=varCountry%><br><%=varBio%><br>
<%=varQuote%></font></p>
<font face="Verdana,Arial" size="2">
<% Set objRecordSet = Nothing %>
** End of Code snippet **
The offending line is :
<img src=<%varPhotoPath%> width="80" height="80" border="0">
And the line :
response.write(varPhotoPath)
Proves to me that it holds a valid 'string' (i.e. Images/gallery/ )
Thanks in advance!
Regards,
Ed Cox
ecox@b...
Sydney, Australia
Message #2 by smustafa@a... on Mon, 21 Jan 2002 12:06:49 +0500
|
|
Try this code now.
<img src="<%=varPhotoPath%>" width="80" height="80" border="0">
Regards,
Salman Mustafa
Edward Cox
<ecox@b... To: "ASP Databases" <asp_databases@p...>
.net.au> cc:
Subject: [asp_databases] How to include a URL in ASP/HTML?
01/21/2002
11:59 AM
Please
respond to
"ASP
Databases"
Hi,
First time poster here. Can some kind person please tell me what I am doing
wrong here.
Trying to simple include a URL in a HTML page via ASP from a MySQL
database.. But get:
Vbscript Runtime error 'ASP 0185 : 13'
Type mismatch
/individual.asp,line 182
** Here's the HTML code snippet **
<%
varContactID = objRecordSet("id")
varCompany = "" & objRecordSet("g_company")
varLastName = "" & objRecordSet("g_lastname")
varFirstName = "" & objRecordSet("g_firstname")
varPosition = "" & objRecordSet("g_position")
varCountry = "" & objRecordSet("g_country")
varQuote = "" & objRecordSet("g_quote")
varBio = "" & objRecordSet("g_biography")
varPhotoPath = "images/gallery/" & objRecordSet("g_photopath")
response.write(varPhotoPath)
%>
</font></p><p class=MsoNormal style="text-align:justify"><font
face="Verdana,Helvetica" size="2"><b>CEO GALLERY FOR <%=UCase(varFirstName)
& " " & UCase(varLastName)%></b></font></p>
<img src=<%varPhotoPath%> width="80" height="80" border="0">
<p class=MsoNormal style="text-align:justify">
<font face="Verdana,Arial" size="2"><%=varCompany%>,<br>
<%=varPosition%>, <%=varCompany%><br>
<%=varCountry%><br><%=varBio%><br>
<%=varQuote%></font></p>
<font face="Verdana,Arial" size="2">
<% Set objRecordSet = Nothing %>
** End of Code snippet **
The offending line is :
<img src=<%varPhotoPath%> width="80" height="80" border="0">
And the line :
response.write(varPhotoPath)
Proves to me that it holds a valid 'string' (i.e. Images/gallery/ )
Thanks in advance!
Regards,
Ed Cox
ecox@b...
Sydney, Australia
$subst('Email.Unsub').
Message #3 by "Dallas Martin" <dmartin@z...> on Mon, 21 Jan 2002 09:32:48 -0500
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0018_01C1A25E.96EBDCF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
1) Try the Server.UrlEncode function
varPhotoPath =3D SERVER.URLENCODE("images/gallery/" &
objRecordSet("g_photopath"))
2) Surround the src attribute with quotes AND don't forget the "=3D"
before the use of the varPhotoPath
<img src=3D"<%=3DvarPhotoPath%>" width=3D"80" height=3D"80"
border=3D"0">
Dallas
----- Original Message -----
From: Edward Cox
To: ASP Databases
Sent: Monday, January 21, 2002 1:59 AM
Subject: [asp_databases] How to include a URL in ASP/HTML?
Hi,
First time poster here. Can some kind person please tell me what I am
doing
wrong here.
Trying to simple include a URL in a HTML page via ASP from a MySQL
database.. But get:
Vbscript Runtime error 'ASP 0185 : 13'
Type mismatch
/individual.asp,line 182
** Here's the HTML code snippet **
<%
varContactID =3D objRecordSet("id")
varCompany =3D "" & objRecordSet("g_company")
varLastName =3D "" & objRecordSet("g_lastname")
varFirstName =3D "" & objRecordSet("g_firstname")
varPosition =3D "" & objRecordSet("g_position")
varCountry =3D "" & objRecordSet("g_country")
varQuote =3D "" & objRecordSet("g_quote")
varBio =3D "" & objRecordSet("g_biography")
varPhotoPath =3D "images/gallery/" & objRecordSet("g_photopath")
response.write(varPhotoPath)
%>
</font></p><p class=3DMsoNormal style=3D"text-align:justify"><font
face=3D"Verdana,Helvetica" size=3D"2"><b>CEO GALLERY FOR
<%=3DUCase(varFirstName)
& " " & UCase(varLastName)%></b></font></p>
<img src=3D<%varPhotoPath%> width=3D"80" height=3D"80" border=3D"0">
<p class=3DMsoNormal style=3D"text-align:justify">
<font face=3D"Verdana,Arial" size=3D"2"><%=3DvarCompany%>,<br>
<%=3DvarPosition%>, <%=3DvarCompany%><br>
<%=3DvarCountry%><br><%=3DvarBio%><br>
<%=3DvarQuote%></font></p>
<font face=3D"Verdana,Arial" size=3D"2">
<% Set objRecordSet =3D Nothing %>
** End of Code snippet **
The offending line is :
<img src=3D<%varPhotoPath%> width=3D"80" height=3D"80" border=3D"0">
And the line :
response.write(varPhotoPath)
Proves to me that it holds a valid 'string' (i.e. Images/gallery/ )
Thanks in advance!
Regards,
Ed Cox
ecox@b...
Sydney, Australia
$subst('Email.Unsub').
Message #4 by "Larry Guayante" <larryg@k...> on Mon, 21 Jan 2002 08:24:22 -0800
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_0026_01C1A255.076BA6E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
<< The offending line is :
<img src=<%varPhotoPath%> width="80" height="80" border="0"> >>
Try
<img src="<%= varPhotoPath %>" width="80" height="80" border="0">
Larry Guayante
Knowledge Outlook
"performance, process, and learning solutions"
xxx.xxx.xxxx
larry@k...
-----Original Message-----
From: Dallas Martin [mailto:dmartin@z...]
Sent: Monday, January 21, 2002 6:33 AM
To: ASP Databases
Subject: [asp_databases] Re: How to include a URL in ASP/HTML?
1) Try the Server.UrlEncode function
varPhotoPath = SERVER.URLENCODE("images/gallery/" &
objRecordSet("g_photopath"))
2) Surround the src attribute with quotes AND don't forget the "=" before
the use of the varPhotoPath
<img src="<%=varPhotoPath%>" width="80" height="80" border="0">
Dallas
----- Original Message -----
From: Edward Cox
To: ASP Databases
Sent: Monday, January 21, 2002 1:59 AM
Subject: [asp_databases] How to include a URL in ASP/HTML?
Hi,
First time poster here. Can some kind person please tell me what I am
doing
wrong here.
Trying to simple include a URL in a HTML page via ASP from a MySQL
database.. But get:
Vbscript Runtime error 'ASP 0185 : 13'
Type mismatch
/individual.asp,line 182
** Here's the HTML code snippet **
<%
varContactID = objRecordSet("id")
varCompany = "" & objRecordSet("g_company")
varLastName = "" & objRecordSet("g_lastname")
varFirstName = "" & objRecordSet("g_firstname")
varPosition = "" & objRecordSet("g_position")
varCountry = "" & objRecordSet("g_country")
varQuote = "" & objRecordSet("g_quote")
varBio = "" & objRecordSet("g_biography")
varPhotoPath = "images/gallery/" & objRecordSet("g_photopath")
response.write(varPhotoPath)
%>
</font></p><p class=MsoNormal style="text-align:justify"><font
face="Verdana,Helvetica" size="2"><b>CEO GALLERY FOR
<%=UCase(varFirstName)
& " " & UCase(varLastName)%></b></font></p>
<img src=<%varPhotoPath%> width="80" height="80" border="0">
<p class=MsoNormal style="text-align:justify">
<font face="Verdana,Arial" size="2"><%=varCompany%>,<br>
<%=varPosition%>, <%=varCompany%><br>
<%=varCountry%><br><%=varBio%><br>
<%=varQuote%></font></p>
<font face="Verdana,Arial" size="2">
<% Set objRecordSet = Nothing %>
** End of Code snippet **
The offending line is :
<img src=<%varPhotoPath%> width="80" height="80" border="0">
And the line :
response.write(varPhotoPath)
Proves to me that it holds a valid 'string' (i.e. Images/gallery/ )
Thanks in advance!
Regards,
Ed Cox
ecox@b...
Sydney, Australia
$subst('Email.Unsub').
$subst('Email.Unsub').
|
|
 |