Ayuda urgente con codigo ASP y Visual Basic para HTML; GRACIAS!

20/07/2004 - 05:22 por JPRW | Informe spam
Hello All.

I am having issues with the visualbasic gramatic for the following scenario:

I am retrieving information from an Access 2000 Database. The current fields
are:

ebay, which is a yes / no, showing as -1 or 0
ebay_path, which is a memo field with the ebay link to the product
auctioned.

within the HTML code, I have the following code:


-

<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>" target="_blank"><img
src="images/content/ebay_auctions.gif" width="296" height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif" width="296" height="43"
border="0">
end if
%>
-

where
elbadet is the name of the recordset
ebay is the field having the value
ruta_ebay is the other field with the path


Once previewed :is giving me the following error

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

-
-

Technical Information (for support personnel)

a.. Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/lacany/TMP6hxrg14ri3.asp, line 62
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)


b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

c.. Page:
GET /lacany/TMP6hxrg14ri3.asp

d.. Time:
Monday, July 19, 2004, 11:10:52 PM


e.. More information:
Microsoft Support
In plain english I need the statement to behave something like this
(pseudocode)

If the specified filed = -1 then show the active gif image and the link
else
show the inactive gif image
end if statent


Thanks in advance; any help is highly appreciated.

Juan Pablo Rojas
merca-web.com
 

Leer las respuestas

#1 joseba
20/07/2004 - 08:49 | Informe spam
Lo que yo veo es que te falta cerrar y abrir la secuencia
de comandos VBScript en algunos sitios.

Osea asi:

<%if elbadet.Fields.Item("ebay").Value = -1 then%>
<%else%>
<%end if%>

Un saludo.

<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
target="_blank"><img
src="images/content/ebay_auctions.gif" width="296"
height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif"
width="296" height="43"
border="0">
end if
%>

Preguntas similares