Modifying data on databinding in ListView control

Discussion in 'Site Programming, Development and Design' started by DavidLJ, Sep 13, 2010.

  1. I have a ListView control with an ItemTemplate, which has three controls in it. There are two labels, and a hyperlink control. The ListView datasource is an SqlDataSource, with a Select statement supplying text for the two labels, and the NavigateUrl property for the hyperlink control.

    The NavigateUrl property for some items is Null. In this case I want to set the Visible property of the hyperlink to false. Otherwise I want to set the NavigateUrl property to the value from the database field.

    I am trying to put code in the ItemDataBound event of the ListView, without great success - any help is appreciated
     
  2. Ray

    Ray

    You have a URL we can look at?
     
  3. Problem solved

    I have managed to get it to work now, thanks
     

Share This Page