when value is empty

2 posts, 0 answers
  1. L
    L avatar
    298 posts
    Member since:
    Apr 2008

    Posted 06 Nov 2010 Link to this post

    hi

    I am trying to load a default image if there isn't any value in the radmenu during page load. how do i test whether any value are present in the radmenu? Thanks

    Protected Sub RadMenu1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadMenuEventArgs) Handles RadMenu1.ItemDataBound
            If e.Item.Value Is Nothing Then
                imgPhoto.ImageUrl = "~/image/NoPhotoAvailable.jpg"
            Else
                imgPhoto.ImageUrl = e.Item.Value
            End If

    End Sub

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 08 Nov 2010 Link to this post

    Hi L,

    Your code looks fine. Do you have any problems with it?

    Best wishes,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top