![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an ItemTemplate in a datagrid that must use a conditional statement. The templatecolumns is as follows: asp:TemplateColumn HeaderText="Listen To File" ItemTemplate asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="sound.gif" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.path_to_file", "{0:g}") %>' /ItemTemplate /asp:TemplateColumn I only want to display the hyprlink/sound.gif if dataitem.patch_to_file contains a string. So if the value of path_to_file is null or empty then I do not want to display the sound.gif. Path_to_file in the database may be something like http://.../whatver.wav or may be null or empty. Can this be accomplished? Thanks a lot for the advise. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |