Forums: [SOLVED] ASP Runner 9.7 - display image from URL - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] ASP Runner 9.7 - display image from URL Problem to display an image from an URL saved in a db field Rate Topic: -----

#1 User is offline   Dominic 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 30-June 17

Posted 03 July 2017 - 10:05 AM

ASP Runner Enterprise 9.7

Editor / Field Property in Datalist

I enter the following code in folder "View as" in section "Custom", which works fine:

strValue = "<img width=100 height=100 src = ""http://api.meleven.de/out/beldona/3c.fd.40.1828535MP.jpg"" >"


When I replace the fix URL with any kind of variable related
to the datafield "ProdImage" this does not work. Like:

strValue = "<img width=100 height=100 src = "".$data["ProdImage"]."" >"


Found a lot of "solutions" in the forum, but nothing worked...


Thanks for your support
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15433
  • Joined: 03-February 03

Posted 03 July 2017 - 05:58 PM

ProdImage field, what kind of data it contains in the database?
Best regards,
Sergey Kornilov
0

#3 User is offline   Dominic 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 30-June 17

Posted 04 July 2017 - 06:14 AM

View Postadmin, on 03 July 2017 - 05:58 PM, said:

ProdImage field, what kind of data it contains in the database?


It is a varchar(100) field in a SQL Server database and the field value is:

http://api.meleven.d...0.1828535MP.jpg


This field is part of the data we show in the table list (product data) and we
want to show the picture for which we only have the URL.

Thanks for the support

Dominic
0

#4 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15433
  • Joined: 03-February 03

Posted 05 July 2017 - 01:18 PM

$data["ProdImage"] is a PHP syntax. You need to use ASP syntax (the same applies to concatenation).

https://xlinesoft.co...ings_custom.htm
Check example #3 for instance.
Best regards,
Sergey Kornilov
0

#5 User is offline   Dominic 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 30-June 17

Posted 06 July 2017 - 04:40 AM

View Postadmin, on 05 July 2017 - 01:18 PM, said:

$data["ProdImage"] is a PHP syntax. You need to use ASP syntax (the same applies to concatenation).

https://xlinesoft.co...ings_custom.htm
Check example #3 for instance.



After some more tries I found it:

strValue = "<img width=100 height=100 src='" & data("ProdImage")&"'>"


Thanks

Dominic
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked