I am trying to hide Hyperlink visibility in Repeater if there isn't any Text value in Hyperlink. Something like this:
Protected Sub rptReferenca_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptReferenca.ItemDataBound
Dim lnkThumb As HyperLink = CType(rptReferenca.FindControl("lnkThumb"), HyperLink)
If lnkThumb.Text = 0 Then
lnkThumb.Visible = False
End If
End Sub
But of course it doesn't work. Any help is appreciated.
You're almost there:
Dim lnkThumb As HyperLink = CType(e.Item.FindControl("lnkThumb"), HyperLink)
If lnkThumb.Text.Length = 0 Then
lnkThumb.Visible = False
End If
Need to extract the control from the RepeaterItemEventArgs and check the Length of the text.