CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Dynamical src in ImageLink (ASP)

Print topic Send  topic

Author Message
Marek Stachura
Posted: 01/27/2003, 3:35 AM

Hi,
I'm new in CodeCharge community, but i hope that we will sucefully cooperate
;)
Greets to all of You!
My problem is to create a dynamically src in ImageLink,
i have a grid, one column of my grid is imagelink, the src and href for this
ImageLink should be diffrent for
some value in my database.
With href is no problem, ImageLink object has a property .Page and i have
set this
property in code in Sub Show():
#############
If Recordset.Fields("myField")= "first" Then
ImageLink1.Page = "first.asp"
Elseif Recordset.Fields("myField")= "second" Then
ImageLink1.Page = "second.asp"
Else
ImageLink1.Page = "default.asp"
End If
#############
How can I set a src of my ImageLink for this 3 diffrent cases?
Thanks
Marek

Marek Stachura
Posted: 01/27/2003, 5:49 AM

Hi,
I've found the solution of my problem,
My grid calls grid1, my src-variable calls src1 so:
#############
If Recordset.Fields("myField")= "first" Then
ImageLink1.Page = "first.asp"
grid1.TemplateBlock.Block("Row").Variable("src1") = "firstImg.gif"
Elseif Recordset.Fields("myField")= "second" Then
ImageLink1.Page = "second.asp"
grid1.TemplateBlock.Block("Row").Variable("src1") = "secondImg.gif"
Else
ImageLink1.Page = "default.asp"
grid1.TemplateBlock.Block("Row").Variable("src1") = "defaultImg.gif"
End If
#############

Thanks anyway.
Marek


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.