M
MikeD
Hello,
I'm trying to switch the picture displayed in an asp:image control based on
info obtained from a datatable. If the table contains a value of true then I
wish to display one image or else display the other. The code I have to
perform the test is correct, but it doesn't switch the image url. Here's
what I have so far...
If CurrRows(0)(7).ToString = "True" Then
Me.imgNew.ImageUrl = "images\new.gif"
Else
Me.imgNew.ImageUrl = "images\blank.gif"
End If
This is in VB. If I output the ImageURL as a string to a label it shows
correctly, but dosn't change on the page. The whole lot is within a Repeater
control if that makes a difference.
I don't get any errors but then neither do I get the desired result.
Any thoughts? Please?
<M>ike
I'm trying to switch the picture displayed in an asp:image control based on
info obtained from a datatable. If the table contains a value of true then I
wish to display one image or else display the other. The code I have to
perform the test is correct, but it doesn't switch the image url. Here's
what I have so far...
If CurrRows(0)(7).ToString = "True" Then
Me.imgNew.ImageUrl = "images\new.gif"
Else
Me.imgNew.ImageUrl = "images\blank.gif"
End If
This is in VB. If I output the ImageURL as a string to a label it shows
correctly, but dosn't change on the page. The whole lot is within a Repeater
control if that makes a difference.
I don't get any errors but then neither do I get the desired result.
Any thoughts? Please?
<M>ike