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
|
|
|
 |
|