This topic is locked
[SOLVED]

 ASP Runner 9.7 - display image from URL

7/3/2017 6:05:21 AM
ASPRunnerPro General questions
D
Dominic author

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 = ""https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=24826&image=1&table=forumtopics""; >"
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

admin 7/3/2017

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

D
Dominic author 7/4/2017



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:
https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=82550&image=1&table=forumreplies
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

admin 7/5/2017

$data["ProdImage"] is a PHP syntax. You need to use ASP syntax (the same applies to concatenation).
https://xlinesoft.com/asprunnerpro/docs/_view_as__settings_custom.htm

Check example #3 for instance.

D
Dominic author 7/6/2017



$data["ProdImage"] is a PHP syntax. You need to use ASP syntax (the same applies to concatenation).
https://xlinesoft.com/asprunnerpro/docs/_view_as__settings_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